Commit e8219202 by Iain Sandoe

coroutines: Update func-params-08.C to suspend three times.

The awaitable initially committed was returning "always ready"
which meant that the suspension code was not used.  Update
the test to suspend at each co_await, since this exercises more
of the infrastructure.

gcc/testsuite/ChangeLog:

2020-02-28  Iain Sandoe  <iain@sandoe.co.uk>

	* g++.dg/coroutines/torture/func-params-08.C: Update
	to suspend for each co_await operation.
parent 3f469f58
2020-02-28 Iain Sandoe <iain@sandoe.co.uk>
* g++.dg/coroutines/torture/func-params-08.C: Update
to suspend for each co_await operation.
2020-02-28 Paul Thomas <pault@gcc.gnu.org>
PR fortran/92785
......
......@@ -46,7 +46,7 @@ struct Foo {
{
int v;
awaitable (int _v) : v(_v) {}
bool await_ready() { return true; }
bool await_ready() { return false; }
void await_suspend(coro::coroutine_handle<>) {}
int await_resume() { return v;}
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment