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

            Bug ID: 84972
           Summary: internal compiler error: tree check: expected class
                    'type', have 'exceptional' (error_mark) in
                    extended_tree, at tree.h:5545
           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:

char(a[])({.a = 0})

Output:

$ cc1plus 
<stdin>:1:19: warning: list-initializer for non-class type must not be
parenthesized
<stdin>:1:19: error: name 'a' used in a GNU-style designated initializer for an
array
<stdin>:1:19: error: name 'a' used in a GNU-style designated initializer for an
array
<stdin>:1:19: internal compiler error: tree check: expected class 'type', have
'exceptional' (error_mark) in extended_tree, at tree.h:5545
0x660619 tree_class_check_failed(tree_node const*, tree_code_class, char
const*, int, char const*)
        /home/vegard/git/gcc/gcc/tree.c:9388
0x1506d85 tree_class_check(tree_node*, tree_code_class, char const*, int, char
const*)
        /home/vegard/git/gcc/gcc/tree.h:3255
0x1506d85 wi::extended_tree<192>::extended_tree(tree_node const*)
        /home/vegard/git/gcc/gcc/tree.h:5545
0x1506d85 generic_wide_int<wi::extended_tree<192> >::generic_wide_int<tree_node
const*>(tree_node const* const&)
        /home/vegard/git/gcc/gcc/wide-int.h:750
0x1506d85 wi::to_widest(tree_node const*)
        /home/vegard/git/gcc/gcc/tree.h:5472
0x1506d85 tree_int_cst_lt(tree_node const*, tree_node const*)
        /home/vegard/git/gcc/gcc/tree.h:5725
0x1506d85 complete_array_type(tree_node**, tree_node*, bool)
        /home/vegard/git/gcc/gcc/c-family/c-common.c:6353
0xb41f7a cp_complete_array_type(tree_node**, tree_node*, bool)
        /home/vegard/git/gcc/gcc/cp/decl.c:8320
0x141da51 process_init_constructor
        /home/vegard/git/gcc/gcc/cp/typeck2.c:1724
0x141da51 digest_init_r
        /home/vegard/git/gcc/gcc/cp/typeck2.c:1148
0x142ad1a digest_init_flags(tree_node*, tree_node*, int, int)
        /home/vegard/git/gcc/gcc/cp/typeck2.c:1193
0x142ad1a store_init_value(tree_node*, tree_node*, vec<tree_node*, va_gc,
vl_embed>**, int)
        /home/vegard/git/gcc/gcc/cp/typeck2.c:814
0xb45618 check_initializer
        /home/vegard/git/gcc/gcc/cp/decl.c:6424
0xbd954e cp_finish_decl(tree_node*, tree_node*, bool, tree_node*, int)
        /home/vegard/git/gcc/gcc/cp/decl.c:7078
0xfa0a29 cp_parser_init_declarator
        /home/vegard/git/gcc/gcc/cp/parser.c:19731
0xfa57a7 cp_parser_simple_declaration
        /home/vegard/git/gcc/gcc/cp/parser.c:13065
0xfab998 cp_parser_block_declaration
        /home/vegard/git/gcc/gcc/cp/parser.c:12883
0xffead5 cp_parser_declaration
        /home/vegard/git/gcc/gcc/cp/parser.c:12780
0xff5b8b cp_parser_declaration_seq_opt
        /home/vegard/git/gcc/gcc/cp/parser.c:12656
0xff71b3 cp_parser_translation_unit
        /home/vegard/git/gcc/gcc/cp/parser.c:4561
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)

Looks potentially similar to #84662, but that one has been fixed on trunk
according to godbolt.org, whereas this one still crashes.

Reply via email to