From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id DE4413865C17; Thu, 23 May 2024 20:24:12 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DE4413865C17 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1716495852; bh=Ulg1V4EhbiE2LD2sZQFEGqEF80cTsZnJUrw1a9ATtW8=; h=From:To:Subject:Date:In-Reply-To:References:From; b=jgeqy+K2t2cGWxb+gCDnlSL40d3W/q7/e+KenG7m+5Vzy3dXgOcLodJ3GoxWZizB1 clHjwaVgWJNucTIAODLJ7oD27D7sAPzecYTynlF1Wc/kdF7RPTX7THcgRq05wYjYam YHuC8esm9Nmds4b289Y2rTGOO8Ap1sn6IbDlvlVU= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/115187] [14/15 Regression] ICE when deleting temporary array Date: Thu, 23 May 2024 20:24:11 +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 #6 from GCC Commits --- The trunk branch has been updated by Jason Merrill : https://gcc.gnu.org/g:ed63cd2aa5b114565fe5499c3a6bf8da5e8e48ba commit r15-796-ged63cd2aa5b114565fe5499c3a6bf8da5e8e48ba 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.=