https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109682
--- Comment #6 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-14 branch has been updated by Iain D Sandoe <ia...@gcc.gnu.org>: https://gcc.gnu.org/g:1b3addb6fe05a80d5e043fbb12cc9c0cc426b0e6 commit r14-11726-g1b3addb6fe05a80d5e043fbb12cc9c0cc426b0e6 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> (cherry picked from commit f4915e6c4cd42e7d6f397dc36fab507cc47dad05)