From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 487063865C2D; Fri, 24 May 2024 15:15:23 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 487063865C2D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1716563723; bh=4XLYqVSvnWjDpO/5noShKOQBb0+JiDnnDnCElPuO/D0=; h=From:To:Subject:Date:In-Reply-To:References:From; b=cIaM9uHixtm8DPVoFO1XMYOK7L4xEJlDQ47oC544Ij3WCVXhk6tvUxwDzQXxaOBKo 5LYGPbWEpCXbo4quZ/4xOvoDCRcYlemvEjz+Eohrx0yf4cviKEzZq05HjrcSivzlMZ hBDLxMe/tlziNl4j10mZcVKi3jJnfD7AqmpyPbsw= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/115187] [14 Regression] ICE when deleting temporary array Date: Fri, 24 May 2024 15:15:22 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 15.0 X-Bugzilla-Keywords: ice-on-invalid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: jason at gcc dot gnu.org X-Bugzilla-Target-Milestone: 14.2 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D115187 --- Comment #7 from GCC Commits --- The releases/gcc-14 branch has been updated by Jason Merrill : https://gcc.gnu.org/g:9031c027827bff44e1b55c366fc7034c43501b4c commit r14-10242-g9031c027827bff44e1b55c366fc7034c43501b4c Author: Jason Merrill 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 crashe= s in verify_gimple_stmt, because the TARGET_EXPR is first evaluated inside t= he 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 think= ing it's a suitable replacement. PR c++/115187 gcc/cp/ChangeLog: * init.cc (build_delete): Use get_target_expr instead of save_e= xpr. * tree.cc (stabilize_expr): Update comment. gcc/testsuite/ChangeLog: * g++.dg/cpp1z/array-prvalue3.C: New test.=