https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63866
Bug ID: 63866 Summary: ICE in C++ printer with -fdump-ipa Product: gcc Version: 5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: sanitizer Assignee: unassigned at gcc dot gnu.org Reporter: mpolacek at gcc dot gnu.org CC: dodji at gcc dot gnu.org, dvyukov at gcc dot gnu.org, jakub at gcc dot gnu.org, kcc at gcc dot gnu.org Likely TYPE_NAME/TYPE_STUB_DECL aren't set properly for __ubsan_*_data. int main () { int i = __INT_MAX__; i++; asm ("" : "+g" (i)); } $ ./cc1plus -quiet -fsanitize=undefined x.C -fdump-ipa-all x.C:1:62: internal compiler error: tree check: expected tree that contains ‘decl common’ structure, have ‘identifier_node’ in dump_aggr_type, at cp/error.c:650 int main () { int i = __INT_MAX__; i++; asm ("" : "+g" (i)); } ^ 0x123cf49 tree_contains_struct_check_failed(tree_node const*, tree_node_structure_enum, char const*, int, char const*) /home/marek/src/gcc/gcc/tree.c:9365 0x6646b1 contains_struct_check(tree_node*, tree_node_structure_enum, char const*, int, char const*) /home/marek/src/gcc/gcc/tree.h:2871 0x79d47b dump_aggr_type /home/marek/src/gcc/gcc/cp/error.c:650 0x79c0ed dump_type /home/marek/src/gcc/gcc/cp/error.c:453 0x79ecd7 dump_type_prefix /home/marek/src/gcc/gcc/cp/error.c:819 0x79f819 dump_simple_decl /home/marek/src/gcc/gcc/cp/error.c:971 0x7a0298 dump_decl /home/marek/src/gcc/gcc/cp/error.c:1072 0x7a8d7f decl_as_string(tree_node*, int) /home/marek/src/gcc/gcc/cp/error.c:2787 0x7a8e73 lang_decl_name(tree_node*, int, bool) /home/marek/src/gcc/gcc/cp/error.c:2822 0x8796ed cxx_printable_name_internal /home/marek/src/gcc/gcc/cp/tree.c:2026 0x879934 cxx_printable_name(tree_node*, int) /home/marek/src/gcc/gcc/cp/tree.c:2062 0xa186c4 symtab_node::name() const /home/marek/src/gcc/gcc/symtab.c:475 0xa19150 symtab_node::dump_base(_IO_FILE*) /home/marek/src/gcc/gcc/symtab.c:787 0x128d1d8 varpool_node::dump(_IO_FILE*) /home/marek/src/gcc/gcc/varpool.c:224 0xa19c37 symtab_node::dump(_IO_FILE*) /home/marek/src/gcc/gcc/symtab.c:903 0xa19c88 symtab_node::dump_table(_IO_FILE*) /home/marek/src/gcc/gcc/symtab.c:914 0xa342c1 symbol_table::compile() /home/marek/src/gcc/gcc/cgraphunit.c:2276 0xa34401 symbol_table::finalize_compilation_unit() /home/marek/src/gcc/gcc/cgraphunit.c:2342 0x798258 cp_write_global_declarations() /home/marek/src/gcc/gcc/cp/decl2.c:4677 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <http://gcc.gnu.org/bugs.html> for instructions.