public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/101833] New: [9/10/11/12 Regression] ICE with -Wformat on a constructor with a virtual base
@ 2021-08-09 18:25 pinskia at gcc dot gnu.org
  2021-08-09 18:25 ` [Bug c++/101833] " pinskia at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-08-09 18:25 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101833

            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:
<source>:5:26: warning: 'format' attribute argument 2 value '5' exceeds the
number of function parameters 3 [-Wattributes]
    5 | }  a(1, "%s %d", "foo", 1);
      |                          ^
<source>: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

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-05-07 14:59 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-09 18:25 [Bug c++/101833] New: [9/10/11/12 Regression] ICE with -Wformat on a constructor with a virtual base pinskia at gcc dot gnu.org
2021-08-09 18:25 ` [Bug c++/101833] " pinskia at gcc dot gnu.org
2021-08-10  7:34 ` marxin at gcc dot gnu.org
2021-08-12 23:38 ` msebor at gcc dot gnu.org
2022-01-17 13:57 ` rguenth at gcc dot gnu.org
2022-03-31 22:02 ` mpolacek at gcc dot gnu.org
2022-05-07 14:44 ` [Bug c++/101833] [9/10/11/12/13 " cvs-commit at gcc dot gnu.org
2022-05-07 14:59 ` [Bug c++/101833] [9/10/11/12 " mpolacek at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).