c++, coroutines: Account for overloaded promise return_value() [PR105301].
Whether it was intended or not, it is possible to define a coroutine promise
with multiple return_value() methods [which need not even have the same type].
We were not accounting for this possibility in the check to see whether both
return_value and return_void are specifier (which is prohibited by the
standard). Fixed thus and provided an adjusted diagnostic for the case that
multiple return_value() methods are present.
Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>
PR c++/105301
gcc/cp/ChangeLog:
* coroutines.cc (coro_promise_type_found_p): Account for possible
mutliple overloads of the promise return_value() method.
gcc/testsuite/ChangeLog:
* g++.dg/coroutines/pr105301.C: New test.