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

            Bug ID: 89933
           Summary: [7/8/9 Regression] ICE in merge_decls, at
                    c/c-decl.c:2517
           Product: gcc
           Version: 9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gs...@t-online.de
  Target Milestone: ---

Doubled line affects versions 7 up to trunk.
gcc-6 rejects it with an error.
clang7 and icc19 accepts it without any warning/error.


$ cat z1.c
typedef unsigned int a __attribute__ ((__aligned__(8), __may_alias__));
typedef unsigned int a __attribute__ ((__aligned__(8), __may_alias__));


$ gcc-9-20190331 -c z1.c
z1.c:2:1: internal compiler error: Segmentation fault
    2 | typedef unsigned int a __attribute__ ((__aligned__(8), __may_alias__));
      | ^~~~~~~
0xa748df crash_signal
        ../../gcc/toplev.c:326
0x5c9023 merge_decls
        ../../gcc/c/c-decl.c:2517
0x5c9023 duplicate_decls
        ../../gcc/c/c-decl.c:2886
0x5cb067 pushdecl(tree_node*)
        ../../gcc/c/c-decl.c:3072
0x5db56d start_decl(c_declarator*, c_declspecs*, bool, tree_node*)
        ../../gcc/c/c-decl.c:5016
0x61d983 c_parser_declaration_or_fndef
        ../../gcc/c/c-parser.c:2154
0x623a53 c_parser_external_declaration
        ../../gcc/c/c-parser.c:1653
0x624519 c_parser_translation_unit
        ../../gcc/c/c-parser.c:1534
0x624519 c_parse_file()
        ../../gcc/c/c-parser.c:19854
0x66ba20 c_common_parse_file()
        ../../gcc/c-family/c-opts.c:1156

Reply via email to