From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id EC33238582A3; Sun, 31 Jul 2022 06:05:12 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org EC33238582A3 From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/106369] [12/13 Regression] ICE in output_constructor_regular_field, at varasm.cc:5515 since r12-2975-g32c3a75390623a Date: Sun, 31 Jul 2022 06:05:12 +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: 12.1.0 X-Bugzilla-Keywords: ice-on-valid-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: P3 X-Bugzilla-Assigned-To: jason at gcc dot gnu.org X-Bugzilla-Target-Milestone: 12.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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Jul 2022 06:05:13 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D106369 --- Comment #12 from CVS Commits --- The master branch has been updated by Jason Merrill : https://gcc.gnu.org/g:9efe4e153d994974afcbba09c3c683f5f4a19c63 commit r13-1901-g9efe4e153d994974afcbba09c3c683f5f4a19c63 Author: Jason Merrill Date: Tue Jul 26 11:02:21 2022 -0400 c++: constexpr, empty base after non-empty [PR106369] Here the CONSTRUCTOR we were providing for D{} had an entry for the B b= ase subobject at offset 0 following the entry for the C base, causing output_constructor_regular_field to ICE due to going backwards. It mig= ht be nice for that function to be more tolerant of empty fields, but it also seems reasonable for the front end to prune the useless entry. PR c++/106369 gcc/cp/ChangeLog: * constexpr.cc (reduced_constant_expression_p): Return false if a CONSTRUCTOR initializes an empty field. gcc/testsuite/ChangeLog: * g++.dg/cpp1z/constexpr-lambda27.C: New test.=