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

--- 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:ed63cd2aa5b114565fe5499c3a6bf8da5e8e48ba

commit r15-796-ged63cd2aa5b114565fe5499c3a6bf8da5e8e48ba
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