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

--- Comment #7 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-14 branch has been updated by Jason Merrill
<ja...@gcc.gnu.org>:

https://gcc.gnu.org/g:9031c027827bff44e1b55c366fc7034c43501b4c

commit r14-10242-g9031c027827bff44e1b55c366fc7034c43501b4c
Author: Jason Merrill <ja...@redhat.com>
Date:   Wed May 22 18:41:27 2024 -0400

    c++: deleting array temporary [PR115187]

    Decaying the array temporary to a pointer and then deleting that crashes in
    verify_gimple_stmt, because the TARGET_EXPR is first evaluated inside the
    TRY_FINALLY_EXPR, but the cleanup point is outside.  Fixed by using
    get_target_expr instead of save_expr.

    I also adjust the stabilize_expr comment to prevent me from again thinking
    it's a suitable replacement.

            PR c++/115187

    gcc/cp/ChangeLog:

            * init.cc (build_delete): Use get_target_expr instead of save_expr.
            * tree.cc (stabilize_expr): Update comment.

    gcc/testsuite/ChangeLog:

            * g++.dg/cpp1z/array-prvalue3.C: New test.

Reply via email to