https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117364
--- Comment #6 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The trunk branch has been updated by Jason Merrill <ja...@gcc.gnu.org>:

https://gcc.gnu.org/g:7e576d5b64ae92432fc2749b8f66105cee8db356

commit r15-7837-g7e576d5b64ae92432fc2749b8f66105cee8db356
Author: Jason Merrill <ja...@redhat.com>
Date:   Wed Mar 5 08:45:34 2025 -0500

    c++: coroutines and return in registers [PR118874]

    Because coroutines insert a call to the resumer between the initialization
    of the return value and the actual return to the caller, we need to
    duplicate the work of gimplify_return_expr for the !aggregate_value_p case.

            PR c++/117364
            PR c++/118874

    gcc/cp/ChangeLog:

            * coroutines.cc (cp_coroutine_transform::build_ramp_function): For
            !aggregate_value_p return force return value into a local temp.

    gcc/testsuite/ChangeLog:

            * g++.dg/coroutines/torture/pr118874.C: New test.

    Co-authored-by: Jakub Jelinek <ja...@redhat.com>

Reply via email to