From: Jakub Jelinek Date: Tue, 22 Mar 2022 14:37:20 +0000 (+0100) Subject: testsuite: Add testcase for already fixed PR [PR102489] X-Git-Tag: basepoints/gcc-13~543 X-Git-Url: https://gcc.gnu.org/git/?a=commitdiff_plain;h=b6e33907ebe89361f8ddfb7481534cbf4a97f213;p=gcc.git testsuite: Add testcase for already fixed PR [PR102489] This got broken with r12-3529 and fixed with r12-5255. 2022-03-22 Jakub Jelinek PR c++/102489 * g++.dg/coroutines/pr102489.C: New test. --- diff --git a/gcc/testsuite/g++.dg/coroutines/pr102489.C b/gcc/testsuite/g++.dg/coroutines/pr102489.C new file mode 100644 index 000000000000..0ef06daa2112 --- /dev/null +++ b/gcc/testsuite/g++.dg/coroutines/pr102489.C @@ -0,0 +1,16 @@ +// PR c++/102489 +// { dg-do compile } +// { dg-additional-options "-O" } + +#include + +struct footask { + struct promise_type { + std::suspend_never initial_suspend(); + std::suspend_never final_suspend() noexcept; + void unhandled_exception(); + void get_return_object(); + }; + std::suspend_always foo; + footask taskfun() { co_await foo; } +};