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

            Bug ID: 84975
           Summary: internal compiler error: Segmentation fault
                    (outer_binding()/lookup_name_real_1())
           Product: gcc
           Version: 8.0.1
            Status: UNCONFIRMED
          Keywords: ice-on-invalid-code
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: vegard.nossum at oracle dot com
                CC: webrown.cpp at gmail dot com
  Target Milestone: ---

Input:

void a() {
  for (;;)
    union {
      int a;
      struct a struct {
        void a();
      };
    };
  a
}

Output:

$ cc1plus 
 void a()
<stdin>:7:7: error: multiple types in one declaration
<stdin>:9:3: internal compiler error: Segmentation fault
0x3152ce9 crash_signal
        /home/vegard/git/gcc/gcc/toplev.c:325
0xe1d562 outer_binding(tree_node*, cxx_binding*, bool)
        /home/vegard/git/gcc/gcc/cp/name-lookup.c:5879
0xe58739 lookup_name_real_1
        /home/vegard/git/gcc/gcc/cp/name-lookup.c:6002
0xe58739 lookup_name_real(tree_node*, int, int, bool, int, int)
        /home/vegard/git/gcc/gcc/cp/name-lookup.c:6103
0xe8b562 cp_parser_lookup_name
        /home/vegard/git/gcc/gcc/cp/parser.c:26235
0xf48d2a cp_parser_class_name
        /home/vegard/git/gcc/gcc/cp/parser.c:22352
0xf49359 cp_parser_type_name
        /home/vegard/git/gcc/gcc/cp/parser.c:17350
0xf2e479 cp_parser_type_name
        /home/vegard/git/gcc/gcc/cp/parser.c:17332
0xf2e479 cp_parser_simple_type_specifier
        /home/vegard/git/gcc/gcc/cp/parser.c:17204
0xf22abd cp_parser_type_specifier
        /home/vegard/git/gcc/gcc/cp/parser.c:16852
0xf8858a cp_parser_decl_specifier_seq
        /home/vegard/git/gcc/gcc/cp/parser.c:13629
0xfa3a70 cp_parser_simple_declaration
        /home/vegard/git/gcc/gcc/cp/parser.c:12938
0xfab998 cp_parser_block_declaration
        /home/vegard/git/gcc/gcc/cp/parser.c:12883
0xfade64 cp_parser_declaration_statement
        /home/vegard/git/gcc/gcc/cp/parser.c:12476
0xefab2b cp_parser_statement
        /home/vegard/git/gcc/gcc/cp/parser.c:10925
0xefe5eb cp_parser_statement_seq_opt
        /home/vegard/git/gcc/gcc/cp/parser.c:11274
0xeff08a cp_parser_compound_statement
        /home/vegard/git/gcc/gcc/cp/parser.c:11228
0xf9283b cp_parser_function_body
        /home/vegard/git/gcc/gcc/cp/parser.c:21778
0xf9283b cp_parser_ctor_initializer_opt_and_function_body
        /home/vegard/git/gcc/gcc/cp/parser.c:21813
0xf9ba45 cp_parser_function_definition_after_declarator
        /home/vegard/git/gcc/gcc/cp/parser.c:26818
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

Version:

GNU C++14 (GCC) version 8.0.1 20180306 (experimental) (x86_64-pc-linux-gnu)

Reply via email to