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

            Bug ID: 84651
           Summary: internal compiler error: in pop_local_binding, at
                    cp/name-lookup.c:2054
           Product: gcc
           Version: 8.0.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: vegard.nossum at gmail dot com
  Target Milestone: ---

Input:

void a() {
  struct {
    int b struct b
  } x;
}

Output:

$ xgcc -x c++ -S -
<stdin>: In function 'void a()':
<stdin>:3:9: error: expected ';' at end of member declaration
<stdin>:4:3: error: expected unqualified-id before '}' token
<stdin>:4:6: internal compiler error: in pop_local_binding, at
cp/name-lookup.c:2054
0xe0cc4f pop_local_binding(tree_node*, tree_node*)
        /home/vegard/git/gcc/gcc/cp/name-lookup.c:2054
0xbc8eb2 poplevel(int, int, int)
        /home/vegard/git/gcc/gcc/cp/decl.c:776
0x125b433 do_poplevel(tree_node*)
        /home/vegard/git/gcc/gcc/cp/semantics.c:451
0x126981c finish_compound_stmt(tree_node*)
        /home/vegard/git/gcc/gcc/cp/semantics.c:1451
0xf022f2 cp_parser_compound_statement
        /home/vegard/git/gcc/gcc/cp/parser.c:11228
0xf967eb cp_parser_function_body
        /home/vegard/git/gcc/gcc/cp/parser.c:21769
0xf967eb cp_parser_ctor_initializer_opt_and_function_body
        /home/vegard/git/gcc/gcc/cp/parser.c:21804
0xf9f9f5 cp_parser_function_definition_after_declarator
        /home/vegard/git/gcc/gcc/cp/parser.c:26809
0xfa604d cp_parser_function_definition_from_specifiers_and_declarator
        /home/vegard/git/gcc/gcc/cp/parser.c:26726
0xfa604d cp_parser_init_declarator
        /home/vegard/git/gcc/gcc/cp/parser.c:19493
0xfa9757 cp_parser_simple_declaration
        /home/vegard/git/gcc/gcc/cp/parser.c:13063
0xfaf948 cp_parser_block_declaration
        /home/vegard/git/gcc/gcc/cp/parser.c:12881
0x1002c05 cp_parser_declaration
        /home/vegard/git/gcc/gcc/cp/parser.c:12778
0xff9bdb cp_parser_declaration_seq_opt
        /home/vegard/git/gcc/gcc/cp/parser.c:12654
0xffb203 cp_parser_translation_unit
        /home/vegard/git/gcc/gcc/cp/parser.c:4561
0xffb203 c_parse_file()
        /home/vegard/git/gcc/gcc/cp/parser.c:38986
0x15a6ba5 c_common_parse_file()
        /home/vegard/git/gcc/gcc/c-family/c-opts.c:1132

$ xgcc --version
xgcc (GCC) 8.0.1 20180301 (experimental)

Built from git c435a9e730c6e8f10da09d58b4fc9aaeb401b0d5 (r258097).

It seems to have been introduced between 4.5.3 and 4.6.4.

Test case was minimised by C-Reduce.

Reply via email to