From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 7C5A03857701; Mon, 11 Sep 2023 22:11:06 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7C5A03857701 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1694470266; bh=AM3DFOT4RZG6oByXG70QbRQJ+GLL0imEqaDxBhvhWq4=; h=From:To:Subject:Date:In-Reply-To:References:From; b=yZoH3Efza7gVenHEno8Y9/ECaAm98jAkpFWZMPShYxO6KY/7kDO5QjckUsemVZiZq MdoMDTyA0v5CZIXNl0kY2fwF7T9h5J96Xd0aUiNLS57BDHniGar+zoA77WfWkMAa91 lxPvBtwnopLCoL/zPd6u1Eh5DIZrfz5VW2yyPweU= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/106890] [11 Regression] virtual inheritance triggers compiler error when instatiating derived class with in-class initialization since r8-2709-g12659e10c7820071 Date: Mon, 11 Sep 2023 22:11:05 +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.2.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: P2 X-Bugzilla-Assigned-To: jason at gcc dot gnu.org X-Bugzilla-Target-Milestone: 11.5 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=3D106890 --- Comment #6 from CVS Commits --- The releases/gcc-11 branch has been updated by Jason Merrill : https://gcc.gnu.org/g:0d7e5f90597167c36c7816f5bcf689472e8b1940 commit r11-10982-g0d7e5f90597167c36c7816f5bcf689472e8b1940 Author: Jason Merrill Date: Mon May 1 10:57:20 2023 -0400 c++: array DMI and member fn [PR109666] Here it turns out I also needed to adjust cfun when stepping out of the member function to instantiate the DMI. But instead of adding that twe= ak, let's unify with instantiate_body and just push_to_top_level instead of trying to do the minimum subset of it. There was no measurable change = in compile time on stdc++.h. This should also resolve 109506 without yet another tweak. PR c++/106890 PR c++/109666 gcc/cp/ChangeLog: * name-lookup.c (maybe_push_to_top_level) (maybe_pop_from_top_level): Split out... * pt.c (instantiate_body): ...from here. * init.c (maybe_instantiate_nsdmi_init): Use them. * name-lookup.h: Declare them.. gcc/testsuite/ChangeLog: * g++.dg/cpp0x/nsdmi-array2.C: New test. * g++.dg/cpp0x/nsdmi-template25.C: New test.=