From: Iain Sandoe Date: Sat, 4 Jul 2020 18:01:03 +0000 (+0100) Subject: coroutines, testsuite: Rename a test, NFC. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=98fcd2513add205dcdd134eb29a2505ea9f81495;p=gcc.git coroutines, testsuite: Rename a test, NFC. The test was committed with a placeholder name, this renames it as described in the PR. gcc/testsuite/ChangeLog: * g++.dg/coroutines/pr9xxxx-mismatched-traits-and-promise-prev.C: Moved to... * g++.dg/coroutines/pr94760-mismatched-traits-and-promise-prev.C: ...here. --- diff --git a/gcc/testsuite/g++.dg/coroutines/pr94760-mismatched-traits-and-promise-prev.C b/gcc/testsuite/g++.dg/coroutines/pr94760-mismatched-traits-and-promise-prev.C new file mode 100644 index 00000000000..235b5e757be --- /dev/null +++ b/gcc/testsuite/g++.dg/coroutines/pr94760-mismatched-traits-and-promise-prev.C @@ -0,0 +1,29 @@ +// { dg-do compile { target c++17 } } + +#include "coro.h" + +// Test that we get matching types to traits and promise param +// preview. + +// A separate issue from allowing non-class return types. +struct Fake {} ; + +template +struct std::coroutine_traits { + struct promise_type { + promise_type (CallOp op, T ...args) {} + Fake get_return_object() { return {}; } + std::suspend_always initial_suspend() { return {}; } + std::suspend_never final_suspend() { return {}; } + void return_void() {} + void unhandled_exception() {} + }; +}; + + +struct Foo +{ + Fake operator() (int a) { + co_return; + } +}; diff --git a/gcc/testsuite/g++.dg/coroutines/pr9xxxx-mismatched-traits-and-promise-prev.C b/gcc/testsuite/g++.dg/coroutines/pr9xxxx-mismatched-traits-and-promise-prev.C deleted file mode 100644 index 235b5e757be..00000000000 --- a/gcc/testsuite/g++.dg/coroutines/pr9xxxx-mismatched-traits-and-promise-prev.C +++ /dev/null @@ -1,29 +0,0 @@ -// { dg-do compile { target c++17 } } - -#include "coro.h" - -// Test that we get matching types to traits and promise param -// preview. - -// A separate issue from allowing non-class return types. -struct Fake {} ; - -template -struct std::coroutine_traits { - struct promise_type { - promise_type (CallOp op, T ...args) {} - Fake get_return_object() { return {}; } - std::suspend_always initial_suspend() { return {}; } - std::suspend_never final_suspend() { return {}; } - void return_void() {} - void unhandled_exception() {} - }; -}; - - -struct Foo -{ - Fake operator() (int a) { - co_return; - } -};