coroutines: Update func-params-08.C to suspend three times.
authorIain Sandoe <iain@sandoe.co.uk>
Fri, 28 Feb 2020 13:51:43 +0000 (13:51 +0000)
committerIain Sandoe <iain@sandoe.co.uk>
Fri, 28 Feb 2020 20:52:17 +0000 (20:52 +0000)
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.

gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/coroutines/torture/func-params-08.C

index c14935705fb446d324307dc29069d587845cbb12..ff1d1da33003690d44c721a53e456b865546d93e 100644 (file)
@@ -1,3 +1,8 @@
+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
index c34d143fa6825e3e285ff13fa8ee3fee900e1e68..c166745e052de371677e679ea23e5815b705b19d 100644 (file)
@@ -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;}
        };