From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 31688385800C; Mon, 9 Aug 2021 18:25:15 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 31688385800C From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/101833] New: [9/10/11/12 Regression] ICE with -Wformat on a constructor with a virtual base Date: Mon, 09 Aug 2021 18:25:15 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status keywords bug_severity priority component assigned_to reporter target_milestone Message-ID: 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: Mon, 09 Aug 2021 18:25:15 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D101833 Bug ID: 101833 Summary: [9/10/11/12 Regression] ICE with -Wformat on a constructor with a virtual base Product: gcc Version: 12.0 Status: UNCONFIRMED Keywords: ice-on-valid-code Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: pinskia at gcc dot gnu.org Target Milestone: --- Take: class Base {}; struct VDerived : virtual Base { VDerived(int x, const char * f, ...) __attribute__((format(printf, 5, 6))); } a(1, "%s %d", "foo", 1); ----- CUT ---- We get an ICE: :5:26: warning: 'format' attribute argument 2 value '5' exceeds the number of function parameters 3 [-Wattributes] 5 | } a(1, "%s %d", "foo", 1); | ^ :5:26: internal compiler error: in get_constant, at c-family/c-format.c:325 0x1dbb089 internal_error(char const*, ...) This started in 9.1.0=