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

--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jason Merrill <ja...@gcc.gnu.org>:

https://gcc.gnu.org/g:a961ad1b13b9c294d4565344912b8e35ba71b369

commit r13-2524-ga961ad1b13b9c294d4565344912b8e35ba71b369
Author: Arsen ArsenoviÄ <ar...@aarsen.me>
Date:   Sun Sep 4 21:04:23 2022 +0200

    c++: top level bind when rewriting coroutines [PR106188]

    In the edge case of a coroutine not containing any locals, the ifcd/switch
    temporaries would get added to the coroutine frame, corrupting its
    layout. To prevent this, we can make sure there is always a BIND_EXPR at
    the top of the function body, and thus, always a place for our new
    temporaries to go without interfering with the coroutine frame.

    PR c++/106188 - Incorrect frame layout after transforming conditional
statement without top-level bind expression
    PR c++/106713 - if (co_await ...) crashes with a jump to ud2

            PR c++/106188
            PR c++/106713

    gcc/cp/ChangeLog:

            * coroutines.cc (coro_rewrite_function_body): Ensure we have a
            BIND_EXPR wrapping the function body.

    gcc/testsuite/ChangeLog:

            * g++.dg/coroutines/pr106188.C: New test.

    Signed-off-by: Arsen ArsenoviÄ <ar...@aarsen.me>

Reply via email to