[Bug c++/106976] New: internal compiler error: tree check: expected class 'type', have 'exceptional' (error_mark) in override_type_for_decl_p, at dwarf2out.cc:24345
redi at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Sep 20 10:08:43 GMT 2022
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106976
Bug ID: 106976
Summary: internal compiler error: tree check: expected class
'type', have 'exceptional' (error_mark) in
override_type_for_decl_p, at dwarf2out.cc:24345
Product: gcc
Version: 12.2.1
Status: UNCONFIRMED
Keywords: ice-on-invalid-code
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: redi at gcc dot gnu.org
Target Milestone: ---
For this invalid code:
struct S{
constexpr static auto s = requires { []; };
};
Without -g we get an unhelpful error:
$ g++-11 -std=c++20 -g -c ice.C
ice.C:2:25: error: storage size of 'S::s' isn't known
2 | constexpr static auto s = requires { []; };
| ^
But it ICEs with -g
ice.C:1:8: internal compiler error: tree check: expected class 'type', have
'exceptional' (error_mark) in override_type_for_decl_p, at dwarf2out.cc:24345
1 | struct S{
| ^
0x88a36b tree_class_check_failed(tree_node const*, tree_code_class, char
const*, int, char const*)
/home/jwakely/src/gcc/gcc/gcc/tree.cc:8877
0x79a909 tree_class_check(tree_node*, tree_code_class, char const*, int, char
const*)
/home/jwakely/src/gcc/gcc/gcc/tree.h:3643
0x79a909 override_type_for_decl_p
/home/jwakely/src/gcc/gcc/gcc/dwarf2out.cc:24345
0x79a909 gen_variable_die
/home/jwakely/src/gcc/gcc/gcc/dwarf2out.cc:24608
0xd92df8 gen_decl_die
/home/jwakely/src/gcc/gcc/gcc/dwarf2out.cc:27085
0xd9544c gen_member_die
/home/jwakely/src/gcc/gcc/gcc/dwarf2out.cc:25844
0xd9544c gen_struct_or_union_type_die
/home/jwakely/src/gcc/gcc/gcc/dwarf2out.cc:25930
0xd9544c gen_tagged_type_die
/home/jwakely/src/gcc/gcc/gcc/dwarf2out.cc:26131
0xd96660 gen_tagged_type_die
/home/jwakely/src/gcc/gcc/gcc/dwarf2out.cc:26085
0xd96660 gen_type_die_with_usage
/home/jwakely/src/gcc/gcc/gcc/dwarf2out.cc:26326
0xd931bb gen_type_die
/home/jwakely/src/gcc/gcc/gcc/dwarf2out.cc:26381
0xd931bb gen_decl_die
/home/jwakely/src/gcc/gcc/gcc/dwarf2out.cc:27020
0xd9436b dwarf2out_decl
/home/jwakely/src/gcc/gcc/gcc/dwarf2out.cc:27575
0xd94668 dwarf2out_type_decl
/home/jwakely/src/gcc/gcc/gcc/dwarf2out.cc:27293
0xd94668 dwarf2out_type_decl
/home/jwakely/src/gcc/gcc/gcc/dwarf2out.cc:27288
0x10bc934 rest_of_type_compilation(tree_node*, int)
/home/jwakely/src/gcc/gcc/gcc/passes.cc:339
0x997d17 finish_struct_1(tree_node*)
/home/jwakely/src/gcc/gcc/gcc/cp/class.cc:7638
0x998cef finish_struct(tree_node*, tree_node*)
/home/jwakely/src/gcc/gcc/gcc/cp/class.cc:7785
0xaeb608 cp_parser_class_specifier
/home/jwakely/src/gcc/gcc/gcc/cp/parser.cc:26120
0xaeda95 cp_parser_type_specifier
/home/jwakely/src/gcc/gcc/gcc/cp/parser.cc:19488
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
More information about the Gcc-bugs
mailing list