coroutines: Emit error for invalid promise return types [PR97438].
At one stage, use cases were proposed for allowing the promise
type to contain both return_value and return_void. That was
not accepted into C++20, so we should reject it as per the PR.
gcc/cp/ChangeLog:
PR c++/97438
* coroutines.cc (struct coroutine_info): Add a field to
record that we emitted a promise type error.
(coro_promise_type_found_p): Check for the case that the
promise type contains both return_void and return_value.
Emit an error if so, with information about the wrong
type methods.
gcc/testsuite/ChangeLog:
PR c++/97438
* g++.dg/coroutines/pr97438.C: New test.