[Bug c++/118470] [15 Regression] ICE in gimplify_var_or_parm_decl, at gimplify.cc:3341

cvs-commit at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Feb 3 22:01:10 GMT 2025


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

--- Comment #4 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The trunk branch has been updated by Jason Merrill <jason@gcc.gnu.org>:

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

commit r15-7337-gec716ad3f4bdccb6a2780161e74e3168efa68121
Author: Jason Merrill <jason@redhat.com>
Date:   Fri Jan 31 12:31:43 2025 -0500

    c++: coroutines and range for [PR118491]

    The implementation of extended range-for temporaries in r15-3840 confused
    coroutines, because await_statement_walker and the like get confused by the
    EXPR_STMT into thinking that the whole for-loop is a single expression
    statement and try to process it accordingly.  Fixing this seems to be a
    simple matter of dropping the EXPR_STMT.

            PR c++/116914
            PR c++/117231
            PR c++/118470
            PR c++/118491

    gcc/cp/ChangeLog:

            * semantics.cc (finish_for_stmt): Don't wrap the result of
            pop_stmt_list in EXPR_STMT.

    gcc/testsuite/ChangeLog:

            * g++.dg/coroutines/coro-range-for1.C: New test.


More information about the Gcc-bugs mailing list