view gcc/testsuite/g++.dg/coroutines/ramp-return-a.C @ 19:2b5abeee2509 default tip

update gcc11
author anatofuz
date Mon, 25 May 2020 07:50:57 +0900
parents
children
line wrap: on
line source

//  { dg-additional-options "-std=c++14" }

#include "ramp-return.h"

task<int>
foo ()
{
 std::coroutine_handle<promise<int>> _handle;
 return task<int> (_handle);
}

// This ICEd for the PR.

task<int>
bar ()
{
  co_return 0;
}

task<std::vector<int>>
baz ()
{
  co_return std::vector<int>();
}