https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81702
Jan Hubicka <hubicka at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jason at redhat dot com --- Comment #4 from Jan Hubicka <hubicka at gcc dot gnu.org> --- The ICE is about vtable: <var_decl 0x7ffff6bb7990 _ZTVN10__cxxabiv117__class_type_infoE type <array_type 0x7ffff6b572a0 type <pointer_type 0x7ffff6b57150 __vtbl_ptr_type type <function_type 0x7ffff6b57f18> readonly unsigned type_6 DI size <integer_cst 0x7ffff6a09ed0 constant 64> unit size <integer_cst 0x7ffff6a09ee8 constant 8> align 64 symtab 0 alias set -1 canonical type 0x7ffff6b57150> BLK align 64 symtab 0 alias set -1 canonical type 0x7ffff6b572a0 pointer_to_this <pointer_type 0x7ffff6bb3e70>> readonly addressable public static tree_5 ignored external read virtual BLK file t.ii line 107 col 33 user align 64 context <record_type 0x7ffff6bb3f18 __class_type_info> not-really-extern> which is constructed without any DECL_INITIAL. Is this intended? If so, we could just remove the assert and silently ignore it, but I see no point in having vtable attached without actually knowning the contents. The construction happens in: #0 0x00007ffff6eb46ab in memset () from /lib/x86_64-linux-gnu/libc.so.6 #1 0x0000000000d9b145 in ggc_internal_cleared_alloc (size=144, f=0x0, s=0, n=1) at ../../gcc/ggc-common.c:117 #2 0x00000000014a352e in ggc_internal_cleared_alloc (s=144) at ../../gcc/ggc.h:148 #3 0x00000000014a3562 in ggc_alloc_cleared_tree_node_stat (s=144) at ../../gcc/ggc.h:292 #4 0x00000000014a58f1 in make_node_stat (code=VAR_DECL) at ../../gcc/tree.c:1008 #5 0x00000000014b4505 in build_decl_stat (loc=673216, code=VAR_DECL, name=0x7ffff6b99e58, type=0x7ffff6b572a0) at ../../gcc/tree.c:4730 #6 0x00000000008ea6e3 in build_lang_decl_loc (loc=673216, code=VAR_DECL, name=0x7ffff6b99e58, type=0x7ffff6b572a0) at ../../gcc/cp/lex.c:552 #7 0x00000000008ea6b6 in build_lang_decl (code=VAR_DECL, name=0x7ffff6b99e58, type=0x7ffff6b572a0) at ../../gcc/cp/lex.c:541 #8 0x00000000007ca2db in build_vtable (class_type=0x7ffff6bb3f18, name=0x7ffff6b99e58, vtable_type=0x7ffff6b572a0) at ../../gcc/cp/class.c:803 #9 0x00000000007ca601 in get_vtable_decl (type=0x7ffff6bb3f18, complete=1) at ../../gcc/cp/class.c:859 #10 0x0000000000a1e80b in tinfo_base_init (ti=0x7ffff6b5c8c8, target=0x7ffff6b8cd20) at ../../gcc/cp/rtti.c:951 #11 0x0000000000a1f091 in class_initializer (ti=0x7ffff6b5c8c8, target=0x7ffff6b8cd20, n=0) at ../../gcc/cp/rtti.c:1070 #12 0x0000000000a1f3db in get_pseudo_ti_init (type=0x7ffff6b8cd20, tk_index=8) at ../../gcc/cp/rtti.c:1142 #13 0x0000000000a20d2b in emit_tinfo_decl (decl=0x7ffff6b9e480) at ../../gcc/cp/rtti.c:1624 #14 0x00000000008aa3a5 in c_parse_final_cleanups () at ../../gcc/cp/decl2.c:4546 #15 0x0000000000b0dc51 in c_common_parse_file () at ../../gcc/c-family/c-opts.c:1126 #16 0x000000000114fdfb in compile_file () at ../../gcc/toplev.c:468 #17 0x0000000001152444 in do_compile () at ../../gcc/toplev.c:2021 #18 0x0000000001152718 in toplev::main (this=0x7fffffffeaa0, argc=3, argv=0x7fffffffeba8) at ../../gcc/toplev.c:2155 #19 0x0000000001c92e13 in main (argc=3, argv=0x7fffffffeba8) at ../../gcc/main.c:39 Honza