https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109682
--- Comment #4 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Iain D Sandoe <ia...@gcc.gnu.org>: https://gcc.gnu.org/g:f4915e6c4cd42e7d6f397dc36fab507cc47dad05 commit r15-3152-gf4915e6c4cd42e7d6f397dc36fab507cc47dad05 Author: Iain Sandoe <i...@sandoe.co.uk> Date: Sat Aug 17 16:55:29 2024 +0100 c++, coroutines: Allow convertible get_return_on_allocation_fail [PR109682]. We have been requiring the get_return_on_allocation_fail() call to have the same type as the ramp. This is not intended by the standard, so relax that to allow anything convertible to the ramp return. PR c++/109682 gcc/cp/ChangeLog: * coroutines.cc (cp_coroutine_transform::build_ramp_function): Allow for cases where get_return_on_allocation_fail has a type convertible to the ramp return type. gcc/testsuite/ChangeLog: * g++.dg/coroutines/pr109682.C: New test. Signed-off-by: Iain Sandoe <i...@sandoe.co.uk>