https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100261
Bug ID: 100261 Summary: [11/12 Regression] ICE: tree check: expected var_decl or type_decl, have error_mark in emit_tinfo_decl, at cp/rtti.c:1643 Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: asolokha at gmx dot com Target Milestone: --- gcc-11.0.1-alpha20210418 snapshot (g:b412ce8e961052e6becea3bc783a53e1d5feaa0f) ICEs when compiling the following testcase, reduced from libstdc++-v3/testsuite/18_support/type_info/fundamental.cc: #include <typeinfo> namespace std { namespace decimal { class decimal32 { float private__decfloat32; }; } } void foo () { typeid (float); typeid (std::decimal::decimal32); } % g++-11.0.1 -c dvovnhjr.cc dvovnhjr.cc:15:34: error: conflicting declaration 'const __class_type_info_pseudo_8 _ZTIf' 15 | typeid (std::decimal::decimal32); | ^ dvovnhjr.cc:14:16: note: previous declaration as 'const __fundamental_type_info_pseudo_2 _ZTIf' 14 | typeid (float); | ^ dvovnhjr.cc:16:1: internal compiler error: tree check: expected var_decl or type_decl, have error_mark in emit_tinfo_decl, at cp/rtti.c:1643 16 | } | ^ 0x814248 tree_check_failed(tree_node const*, char const*, int, char const*, ...) /var/tmp/portage/sys-devel/gcc-11.0.1_alpha20210418/work/gcc-11-20210418/gcc/tree.c:9816 0x6c3715 tree_check2(tree_node*, char const*, int, char const*, tree_code, tree_code) /var/tmp/portage/sys-devel/gcc-11.0.1_alpha20210418/work/gcc-11-20210418/gcc/tree.h:3372 0x6c3715 emit_tinfo_decl(tree_node*) /var/tmp/portage/sys-devel/gcc-11.0.1_alpha20210418/work/gcc-11-20210418/gcc/cp/rtti.c:1643 0x99d5cc c_parse_final_cleanups() /var/tmp/portage/sys-devel/gcc-11.0.1_alpha20210418/work/gcc-11-20210418/gcc/cp/decl2.c:4994