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

            Bug ID: 97957
           Summary: ICE in init_dynamic_diag_info, at
                    c-family/c-format.c:5024
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gs...@t-online.de
  Target Milestone: ---

A doubled line affects versions down to at least r5 :


$ cat z1.c
typedef long __gcc_host_wide_int__;
typedef long __gcc_host_wide_int__;
__attribute__ ((__format__ (__gcc_diag__, 1, 2)))
void f () {}


$ gcc-11-20201122 -c z1.c
z1.c:4:1: internal compiler error: in init_dynamic_diag_info, at
c-family/c-format.c:5024
    4 | void f () {}
      | ^~~~
0x6d1b97 init_dynamic_diag_info
        ../../gcc/c-family/c-format.c:5024
0x6d1b97 handle_format_attribute(tree_node**, tree_node*, tree_node*, int,
bool*)
        ../../gcc/c-family/c-format.c:5252
0x62a101 decl_attributes(tree_node**, tree_node*, int, tree_node*)
        ../../gcc/attribs.c:724
0x641eef start_function(c_declspecs*, c_declarator*, tree_node*)
        ../../gcc/c/c-decl.c:9410
0x689236 c_parser_declaration_or_fndef
        ../../gcc/c/c-parser.c:2444
0x690a47 c_parser_external_declaration
        ../../gcc/c/c-parser.c:1777
0x691569 c_parser_translation_unit
        ../../gcc/c/c-parser.c:1650
0x691569 c_parse_file()
        ../../gcc/c/c-parser.c:21882
0x6e0772 c_common_parse_file()
        ../../gcc/c-family/c-opts.c:1198

Reply via email to