From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 21F243857C50; Wed, 20 Apr 2022 17:59:19 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 21F243857C50 From: "ppalka at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/105297] [12 Regression] new modules 'xtreme' test cases FAILs Date: Wed, 20 Apr 2022 17:59:18 +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.0 X-Bugzilla-Keywords: testsuite-fail X-Bugzilla-Severity: normal X-Bugzilla-Who: ppalka at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: ppalka at gcc dot gnu.org X-Bugzilla-Target-Milestone: 12.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 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: Wed, 20 Apr 2022 17:59:19 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D105297 --- Comment #10 from Patrick Palka --- (In reply to Jakub Jelinek from comment #9) > (In reply to Patrick Palka from comment #7) > > (In reply to Jonathan Wakely from comment #6) > > > Patrick, I suggest we go with Jakub's suggestion in comment 4, but PT= AL. > >=20 > > LGTM, it seems to be the simplest workaround. I also tried replacing t= he > > NSDMI but that seems to prevent the ICE only for the reduced testcase in > > comment #3. >=20 > Note, the original reduced testcase didn't have the " S" part in there, > i.e. used anonymous struct. Is that what matters for the NSDMI? Interestingly that doesn't seem to make a difference. What seems to matter= is whether the constexpr function modifies the CONSTRUCTOR that it returns: constexpr auto foo() { struct S { int d; } t =3D {}; t.d =3D 0; // doesn't ICE if this line is commented out return t; } template int bar() { constexpr auto t =3D foo(); return 0; }=