[Bug c++/85015] New: internal compiler error: tree check: expected class 'type', have 'exceptional' (error_mark) in build_int_cst, at tree.c:1360
vegard.nossum at oracle dot com
gcc-bugzilla@gcc.gnu.org
Wed Mar 21 07:21:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85015
Bug ID: 85015
Summary: internal compiler error: tree check: expected class
'type', have 'exceptional' (error_mark) in
build_int_cst, at tree.c:1360
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 b() {
enum &&c(());
struct {
void d() { int a[c]; }
};
}
Output:
$ cc1plus
void b()
<stdin>:2:13: error: expected primary-expression before ')' token
void b()::<unnamed struct>::d()
<stdin>:4:23: error: use of local variable with automatic storage from
containing function
<stdin>:2:10: note: 'int&& c' declared here
<stdin>:4:23: error: use of local variable with automatic storage from
containing function
<stdin>:2:10: note: 'int&& c' declared here
<stdin>:4:23: internal compiler error: tree check: expected class 'type', have
'exceptional' (error_mark) in build_int_cst, at tree.c:1360
0x660619 tree_class_check_failed(tree_node const*, tree_code_class, char
const*, int, char const*)
/home/vegard/git/gcc/gcc/tree.c:9388
0x40992d5 tree_class_check(tree_node*, tree_code_class, char const*, int, char
const*)
/home/vegard/git/gcc/gcc/tree.h:3255
0x40992d5 build_int_cst(tree_node*, poly_int<1u, long>)
/home/vegard/git/gcc/gcc/tree.c:1360
0x1fd2277 round_up_loc(unsigned int, tree_node*, unsigned int)
/home/vegard/git/gcc/gcc/fold-const.c:14350
0x30f9e26 finalize_type_size
/home/vegard/git/gcc/gcc/stor-layout.c:1908
0x3115667 layout_type(tree_node*)
/home/vegard/git/gcc/gcc/stor-layout.c:2578
0x408c0c7 build_array_type_1
/home/vegard/git/gcc/gcc/tree.c:7869
0x135eebe build_cplus_array_type(tree_node*, tree_node*)
/home/vegard/git/gcc/gcc/cp/tree.c:985
0xc024d5 create_array_type_for_decl
/home/vegard/git/gcc/gcc/cp/decl.c:9793
0xc024d5 grokdeclarator(cp_declarator const*, cp_decl_specifier_seq*,
decl_context, int, tree_node**)
/home/vegard/git/gcc/gcc/cp/decl.c:10985
0xc158d8 start_decl(cp_declarator const*, cp_decl_specifier_seq*, int,
tree_node*, tree_node*, tree_node**)
/home/vegard/git/gcc/gcc/cp/decl.c:4998
0xf9f96c cp_parser_init_declarator
/home/vegard/git/gcc/gcc/cp/parser.c:19600
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
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
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)
7.3.0 seems ok
More information about the Gcc-bugs
mailing list