https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87089
Dmitry G. Dyachenko <dimhen at gmail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|FIXED |--- --- Comment #5 from Dmitry G. Dyachenko <dimhen at gmail dot com> --- r267346 PASS r267418 FAIL PR87089]$ g++ -flto -fPIC -DPIC -shared a.o b.o b.ii:6:8: warning: type ‘struct ASN1C_CertificateListAssertion’ violates the C++ One Definition Rule [-Wodr] 6 | struct ASN1C_CertificateListAssertion : a{} * b; | ^ a.ii:2:8: note: a type with different bases is defined in another translation unit 2 | struct ASN1C_CertificateListAssertion { | ^ during IPA pass: pure-const lto1: internal compiler error: tree check: expected class ‘type’, have ‘declaration’ (namespace_decl) in type_with_linkage_p, at ipa-utils.h:185 0x732d05 tree_class_check_failed(tree_node const*, tree_code_class, char const*, int, char const*) /home/dimhen/src/gcc_current/gcc/tree.c:9856 0xc1880a maybe_record_node /home/dimhen/src/gcc_current/gcc/ipa-devirt.c:2531 0xc1ec81 possible_polymorphic_call_targets(tree_node*, long, ipa_polymorphic_call_context, bool*, void**, bool) /home/dimhen/src/gcc_current/gcc/ipa-devirt.c:3340 0xc55506 possible_polymorphic_call_targets(cgraph_edge*, bool*, void**, bool) /home/dimhen/src/gcc_current/gcc/ipa-utils.h:118 0xc55506 walk_polymorphic_call_targets /home/dimhen/src/gcc_current/gcc/ipa.c:183 0xc57cd4 symbol_table::remove_unreachable_nodes(_IO_FILE*) /home/dimhen/src/gcc_current/gcc/ipa.c:427 0x98d642 read_cgraph_and_symbols /home/dimhen/src/gcc_current/gcc/lto/lto.c:2978 0x98d642 lto_main() /home/dimhen/src/gcc_current/gcc/lto/lto.c:3362 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. lto-wrapper: fatal error: g++ returned 1 exit status compilation terminated. /usr/local/gdb_current/bin/ld: error: lto-wrapper failed collect2: error: ld returned 1 exit status [dimhen:dim PR87089]$ g++ -v Using built-in specs. COLLECT_GCC=g++ COLLECT_LTO_WRAPPER=/usr/local/gcc_current/libexec/gcc/x86_64-pc-linux-gnu/9.0.0/lto-wrapper OFFLOAD_TARGET_NAMES=nvptx-none Target: x86_64-pc-linux-gnu Configured with: /home/dimhen/src/gcc_current/configure --prefix=/usr/local/gcc_current --enable-checking=yes,df,fold,rtl,extra --enable-languages=c,c++,lto --disable-multilib --enable-shared --enable-threads=posix --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-plugin --enable-initfini-array --with-isl --enable-libmpx --enable-offload-targets=nvptx-none --without-cuda-driver --enable-gnu-indirect-function --with-tune=native Thread model: posix gcc version 9.0.0 20181225 (experimental) [trunk revision 267418] (GCC)