[Bug c++/84632] New: internal compiler error: tree check: expected record_type or union_type or qual_union_type, have array_type in reduced_constant_expression_p, at cp/constexpr.c:1778
vegard.nossum at gmail dot com
gcc-bugzilla@gcc.gnu.org
Thu Mar 1 07:32:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84632
Bug ID: 84632
Summary: internal compiler error: tree check: expected
record_type or union_type or qual_union_type, have
array_type in reduced_constant_expression_p, at
cp/constexpr.c:1778
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:
class {
&&a;
} b[] = b
Output:
$ xgcc -x c++ -S -fpermissive -
<stdin>:2:5: warning: ISO C++ forbids declaration of 'a' with no type
[-fpermissive]
<stdin>:3:3: error: initializer fails to determine size of 'b'
<stdin>:3:9: internal compiler error: tree check: expected record_type or
union_type or qual_union_type, have array_type in
reduced_constant_expression_p, at cp/constexpr.c:1778
0x65f8d0 tree_check_failed(tree_node const*, char const*, int, char const*,
...)
/home/vegard/git/gcc/gcc/tree.c:9337
0xa157d9 tree_check3(tree_node*, char const*, int, char const*, tree_code,
tree_code, tree_code)
/home/vegard/git/gcc/gcc/tree.h:3172
0xa157d9 reduced_constant_expression_p(tree_node*)
/home/vegard/git/gcc/gcc/cp/constexpr.c:1778
0xa159cc verify_constant
/home/vegard/git/gcc/gcc/cp/constexpr.c:1822
0xa4e0c3 cxx_eval_outermost_constant_expr
/home/vegard/git/gcc/gcc/cp/constexpr.c:4829
0xa5cf6c maybe_constant_init_1
/home/vegard/git/gcc/gcc/cp/constexpr.c:5152
0x142bf0e store_init_value(tree_node*, tree_node*, vec<tree_node*, va_gc,
vl_embed>**, int)
/home/vegard/git/gcc/gcc/cp/typeck2.c:836
0xb48848 check_initializer
/home/vegard/git/gcc/gcc/cp/decl.c:6427
0xbdccae cp_finish_decl(tree_node*, tree_node*, bool, tree_node*, int)
/home/vegard/git/gcc/gcc/cp/decl.c:7081
0xfa35d9 cp_parser_init_declarator
/home/vegard/git/gcc/gcc/cp/parser.c:19720
0xfa8357 cp_parser_simple_declaration
/home/vegard/git/gcc/gcc/cp/parser.c:13061
0xfae548 cp_parser_block_declaration
/home/vegard/git/gcc/gcc/cp/parser.c:12879
0x1001295 cp_parser_declaration
/home/vegard/git/gcc/gcc/cp/parser.c:12776
0xff826b cp_parser_declaration_seq_opt
/home/vegard/git/gcc/gcc/cp/parser.c:12652
0xff9893 cp_parser_translation_unit
/home/vegard/git/gcc/gcc/cp/parser.c:4559
0xff9893 c_parse_file()
/home/vegard/git/gcc/gcc/cp/parser.c:38880
0x15a51f5 c_common_parse_file()
/home/vegard/git/gcc/gcc/c-family/c-opts.c:1132
$ xgcc --version
xgcc (GCC) 8.0.1 20180228 (experimental)
Built from git fd1990b25777e5f1307eac1447e8fb5fefe747b4 (r258063).
Looks like bug #84424 but that has been fixed in r257924 and I'm using r258063.
7.3.0 seems fine.
Test case was reduced by C-Reduce.
More information about the Gcc-bugs
mailing list