This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/79652] New: ICE on invalid c++ code in warn_extern_redeclared_static in cp/decl.c:1231


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

            Bug ID: 79652
           Summary: ICE on invalid c++ code in
                    warn_extern_redeclared_static in cp/decl.c:1231
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Keywords: ice-on-invalid-code
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: marxin at gcc dot gnu.org
  Target Milestone: ---

Created attachment 40790
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40790&action=edit
test-case

Adopted from clang:

$ g++ /home/marxin/BIG/Programming/llvm-project/clang/test/CXX/drs/dr6xx.cpp

...

/home/marxin/BIG/Programming/llvm-project/clang/test/CXX/drs/dr6xx.cpp:169:16:
internal compiler error: tree check: expected var_decl or function_decl or
parm_decl, have <invalid tree code> in warn_extern_redeclared_static, at
cp/decl.c:1231
   extern int x[];
                ^
0x15410ca tree_check_failed(tree_node const*, char const*, int, char const*,
...)
        ../../gcc/tree.c:9815
0x836cf3 tree_check3(tree_node*, char const*, int, char const*, tree_code,
tree_code, tree_code)
        ../../gcc/tree.h:3104
0x83d37f warn_extern_redeclared_static(tree_node*, tree_node*)
        ../../gcc/cp/decl.c:1231
0xac7953 pushdecl_maybe_friend_1
        ../../gcc/cp/name-lookup.c:1047
0xac9489 pushdecl_maybe_friend(tree_node*, bool)
        ../../gcc/cp/name-lookup.c:1352
0xac94c0 pushdecl(tree_node*)
        ../../gcc/cp/name-lookup.c:1362
0xac96ce maybe_push_decl(tree_node*)
        ../../gcc/cp/name-lookup.c:1391
0x85389c start_decl(cp_declarator const*, cp_decl_specifier_seq*, int,
tree_node*, tree_node*, tree_node**)
        ../../gcc/cp/decl.c:5136
0x9a8923 cp_parser_init_declarator
        ../../gcc/cp/parser.c:19273
0x99cb59 cp_parser_simple_declaration
        ../../gcc/cp/parser.c:12795
0x99c6c2 cp_parser_block_declaration
        ../../gcc/cp/parser.c:12621
0x99c444 cp_parser_declaration
        ../../gcc/cp/parser.c:12518
0x99bf9d cp_parser_declaration_seq_opt
        ../../gcc/cp/parser.c:12394
0x9a6842 cp_parser_namespace_body
        ../../gcc/cp/parser.c:18294
0x9a67d6 cp_parser_namespace_definition
        ../../gcc/cp/parser.c:18270
0x99c348 cp_parser_declaration
        ../../gcc/cp/parser.c:12498
0x99bf9d cp_parser_declaration_seq_opt
        ../../gcc/cp/parser.c:12394
0x98a935 cp_parser_translation_unit
        ../../gcc/cp/parser.c:4366
0x9dbd52 c_parse_file()
        ../../gcc/cp/parser.c:38430
0xb8e93c c_common_parse_file()
        ../../gcc/c-family/c-opts.c:1107

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]