[Bug c++/84605] New: internal compiler error: in xref_basetypes, at cp/decl.c:13818

vegard.nossum at gmail dot com gcc-bugzilla@gcc.gnu.org
Tue Feb 27 23:07:00 GMT 2018


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

            Bug ID: 84605
           Summary: internal compiler error: in xref_basetypes, at
                    cp/decl.c:13818
           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:

struct b {
        x(((struct b {})));
};

Output:

$ xgcc -x c++ -std=c++14 -O3 -c -
<stdin>:2:4: error: expected identifier before '(' token
<stdin>:2:13: internal compiler error: in xref_basetypes, at cp/decl.c:13818
0xb675a7 xref_basetypes(tree_node*, tree_node*)
        /home/vegard/git/gcc/gcc/cp/decl.c:13818
0xf172df cp_parser_class_head
        /home/vegard/git/gcc/gcc/cp/parser.c:23181
0xf172df cp_parser_class_specifier_1
        /home/vegard/git/gcc/gcc/cp/parser.c:22388
0xf1fcbb cp_parser_class_specifier
        /home/vegard/git/gcc/gcc/cp/parser.c:22702
0xf1fcbb cp_parser_type_specifier
        /home/vegard/git/gcc/gcc/cp/parser.c:16708
0xf8520a cp_parser_decl_specifier_seq
        /home/vegard/git/gcc/gcc/cp/parser.c:13573
0xfb3e8d cp_parser_parameter_declaration
        /home/vegard/git/gcc/gcc/cp/parser.c:21440
0xfb67da cp_parser_parameter_declaration_list
        /home/vegard/git/gcc/gcc/cp/parser.c:21252
0xfb9470 cp_parser_parameter_declaration_clause
        /home/vegard/git/gcc/gcc/cp/parser.c:21173
0xf555ef cp_parser_direct_declarator
        /home/vegard/git/gcc/gcc/cp/parser.c:19926
0xf5ca20 cp_parser_declarator
        /home/vegard/git/gcc/gcc/cp/parser.c:19800
0xf56eda cp_parser_direct_declarator
        /home/vegard/git/gcc/gcc/cp/parser.c:20019
0xf5ca20 cp_parser_declarator
        /home/vegard/git/gcc/gcc/cp/parser.c:19800
0xfb4103 cp_parser_parameter_declaration
        /home/vegard/git/gcc/gcc/cp/parser.c:21500
0xfb67da cp_parser_parameter_declaration_list
        /home/vegard/git/gcc/gcc/cp/parser.c:21252
0xfb9470 cp_parser_parameter_declaration_clause
        /home/vegard/git/gcc/gcc/cp/parser.c:21173
0xf555ef cp_parser_direct_declarator
        /home/vegard/git/gcc/gcc/cp/parser.c:19926
0xf9b858 cp_parser_declarator
        /home/vegard/git/gcc/gcc/cp/parser.c:19800
0xfdc2e6 cp_parser_member_declaration
        /home/vegard/git/gcc/gcc/cp/parser.c:23696
0xf10d9b cp_parser_member_specification_opt
        /home/vegard/git/gcc/gcc/cp/parser.c:23308

Version:

xgcc (GCC) 8.0.1 20180204 (experimental)

built from git fdae6180ad24fa6303fa046114f3e4b66b8db34d

Version 7.3.0 don't seem to be affected AFAICS.

Test case was reduced using C-Reduce.


More information about the Gcc-bugs mailing list