From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 5DE003857C71; Thu, 9 Mar 2023 21:26:52 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5DE003857C71 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1678397212; bh=VCePl8bY+nDm0u1ScJolYjc/+0B8Hy7wWa2soTvK/ao=; h=From:To:Subject:Date:In-Reply-To:References:From; b=LiCWMyl9+C/T4ISl+THsF4BBQvI2TJCzKK8Hp4Ge98O6xG18tShO8bZvjIcvNtNe7 3VBzdMSQdX95JCXde1bEnGAfdQ5rPBL1GRcA1EzG4T7x9YGBHsccTtLE/R3zXLg7Dm QGasfFRehq1oKPOtuYQyDgI5DH7mDFvlX2MrKSM0= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/108773] [13 Regression] ICE in gimplify_var_or_parm_decl, at gimplify.cc:3058 compiling ceph since r13-4563-g1e1847612d7f169f Date: Thu, 09 Mar 2023 21:26:51 +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: 13.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: jason at gcc dot gnu.org X-Bugzilla-Target-Milestone: 13.0 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=3D108773 --- Comment #14 from CVS Commits --- The trunk branch has been updated by Jason Merrill : https://gcc.gnu.org/g:e0324e2629e25a90c13c68b4eef1e47b091970c3 commit r13-6566-ge0324e2629e25a90c13c68b4eef1e47b091970c3 Author: Jason Merrill Date: Mon Mar 6 22:57:57 2023 -0500 c++: allocator temps in list of arrays [PR108773] The optimization to reuse the same allocator temporary for all string constructor calls was breaking on this testcase, because the temps were already in the argument to build_vec_init, and replacing them with references to one slot got confused with calls at multiple levels (for = the initializer_list backing array, and then again for the array member of = the std::array). Fixed by reusing the whole TARGET_EXPR instead of pulling= out the slot; gimplification ensures that it's only initialized once. I also moved the check for initializing a std:: class down into the tree walk, and handle multiple temps within a single array element initialization. PR c++/108773 gcc/cp/ChangeLog: * init.cc (find_allocator_temps_r): New. (combine_allocator_temps): Replace find_allocator_temp. (build_vec_init): Adjust. gcc/testsuite/ChangeLog: * g++.dg/cpp0x/initlist-array18.C: New test. * g++.dg/cpp0x/initlist-array19.C: New test.=