https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120453

--- Comment #18 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-15 branch has been updated by Iain D Sandoe
<ia...@gcc.gnu.org>:

https://gcc.gnu.org/g:4b2da16d0493f4154825ebdcbd8fad2f79a95ed5

commit r15-10086-g4b2da16d0493f4154825ebdcbd8fad2f79a95ed5
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>
    (cherry picked from commit 217b7f655227a52e5fe26729baa09dc6083ed577)

Reply via email to