aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIain Sandoe <iain@sandoe.co.uk>2020-02-28 13:51:43 +0000
committerIain Sandoe <iain@sandoe.co.uk>2020-02-28 20:52:17 +0000
commite82192021dd08291ee418cb33bb7af037952e963 (patch)
treee3de5e123ee398f73482391dd765812171a51971
parent3f469f585e08802d4d4add549f34c1afb2ae3157 (diff)
downloadgcc-e82192021dd08291ee418cb33bb7af037952e963.zip
gcc-e82192021dd08291ee418cb33bb7af037952e963.tar.gz
gcc-e82192021dd08291ee418cb33bb7af037952e963.tar.bz2
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.
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/g++.dg/coroutines/torture/func-params-08.C2
2 files changed, 6 insertions, 1 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index c149357..ff1d1da 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -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
diff --git a/gcc/testsuite/g++.dg/coroutines/torture/func-params-08.C b/gcc/testsuite/g++.dg/coroutines/torture/func-params-08.C
index c34d143..c166745 100644
--- a/gcc/testsuite/g++.dg/coroutines/torture/func-params-08.C
+++ b/gcc/testsuite/g++.dg/coroutines/torture/func-params-08.C
@@ -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;}
};