https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120453
--- Comment #16 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:217b7f655227a52e5fe26729baa09dc6083ed577 commit r16-961-g217b7f655227a52e5fe26729baa09dc6083ed577 Author: Iain Sandoe <i...@sandoe.co.uk> Date: Thu May 29 11:00:18 2025 +0100 c++, coroutines: Fix identification of coroutine ramps [PR120453]. The existing implementation, incorrectly, tried to use DECL_RAMP_FN in check_return_expr to determine if we are handling a ramp func. However, that query is only set for the resume/destroy functions. Replace the use of DECL_RAMP_FN with a new query. PR c++/120453 gcc/cp/ChangeLog: * cp-tree.h (DECL_RAMP_P): New. * typeck.cc (check_return_expr): Use DECL_RAMP_P instead of DECL_RAMP_FN. gcc/testsuite/ChangeLog: * g++.dg/coroutines/pr120453.C: New test. Signed-off-by: Iain Sandoe <i...@sandoe.co.uk>