https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92600
Bug ID: 92600 Summary: ICE: lto1: internal compiler error: symtab_node::verify failed, building 523.xalancbmk_r with -flto -fno-inline Product: gcc Version: 10.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: lto Assignee: unassigned at gcc dot gnu.org Reporter: pthaugen at gcc dot gnu.org CC: dje at gcc dot gnu.org, marxin at gcc dot gnu.org, segher at kernel dot crashing.org, wschmidt at gcc dot gnu.org Target Milestone: --- Host: powerpc64le-unknown-linux-gnu Target: powerpc64le-unknown-linux-gnu Build: powerpc64le-unknown-linux-gnu I'm seeing the following ICE when building CPU2017 523.xalancbmk_r with the options "-O2 -mcpu=power8 -flto -fno-inline". The errors are emitted during the link step. AttributeListImpl.cpp:246:8: warning: type 'struct NameCompareFunctor' violates the C++ One Definition Rule [-Wodr] 246 | struct NameCompareFunctor | ^ AttributesImpl.cpp:266:8: note: a different type is defined in another translation unit 266 | struct NameCompareFunctor | ^ AttributeListImpl.cpp:261:21: note: the first difference of corresponding definitions is field 'm_name' 261 | const XMLCh* const m_name; | ^ AttributesImpl.cpp:281:21: note: a field with different name is defined in another translation unit 281 | const XMLCh* const m_qname; | ^ AttributeListImpl.cpp:246:8: note: type 'struct NameCompareFunctor' itself violates the C++ One Definition Rule 246 | struct NameCompareFunctor | ^ AttributesImpl.cpp:266:8: note: the incompatible type is defined here 266 | struct NameCompareFunctor | ^ lto1: error: Two symbols with same comdat_group are not linked by the same_comdat_group list. _ZN11xercesc_2_715XercesDOMParser13resetEntitiesEv/871705 (resetEntities) @0x71d34b022ec0 Type: function definition analyzed Visibility: externally_visible undef public weak comdat comdat_group:_ZN11xercesc_2_715XercesDOMParser13resetEntitiesEv one_only section:.text._ZN11xercesc_2_715XercesDOMParser13resetEntitiesEv (implicit_section) virtual Address is taken. References: Referring: *.LTHUNK8/459137 (alias)_ZTVN11xercesc_2_715XercesDOMParserE/1291254 (addr)_ZTVN11xercesc_2_712XSDDOMParserE/872502 (addr) Read from file: XSDDOMParser.o Function flags: count:1073741824 (estimated locally) merged_comdat Called by: Calls: _ZThn16_N11xercesc_2_715XercesDOMParser13resetEntitiesEv/459138 (_ZThn16_N11xercesc_2_715XercesDOMParser13resetEntitiesEv) @0x71d349e9ef40 Type: function definition analyzed Visibility: externally_visible prevailing_def_ironly public weak comdat comdat_group:_ZN11xercesc_2_715XercesDOMParser13resetEntitiesEv one_only section:.text._ZN11xercesc_2_715XercesDOMParser13resetEntitiesEv (implicit_section) virtual artificial Same comdat group as: *.LTHUNK8/459137 Address is taken. References: Referring: _ZTVN11xercesc_2_712XSDDOMParserE/872502 (addr)_ZTVN11xercesc_2_715XercesDOMParserE/1291254 (addr) Read from file: IGXMLScanner2.o Function flags: calls_comdat_local merged_comdat indirect_call_target Thunk fixed offset -16 virtual value 0 indirect_offset 0 has virtual offset 0 Called by: Calls: *.LTHUNK8/459137 (can throw external) during IPA pass: pure-const lto1: internal compiler error: symtab_node::verify failed 0x102ab7df symtab_node::verify_symtab_nodes() /home/pthaugen/src/gcc/trunk/gcc/gcc/symtab.c:1310 0x10654a23 symtab_node::checking_verify_symtab_nodes() /home/pthaugen/src/gcc/trunk/gcc/gcc/cgraph.h:648 0x10654a23 symbol_table::remove_unreachable_nodes(_IO_FILE*) /home/pthaugen/src/gcc/trunk/gcc/gcc/ipa.c:667 0x101f26f7 read_cgraph_and_symbols(unsigned int, char const**) /home/pthaugen/src/gcc/trunk/gcc/gcc/lto/lto-common.c:2910 0x101c3bcb lto_main() /home/pthaugen/src/gcc/trunk/gcc/gcc/lto/lto.c:629 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: /home/pthaugen/install/gcc/trunk/bin/g++ returned 1 exit status compilation terminated. /usr/bin/ld: error: lto-wrapper failed collect2: error: ld returned 1 exit status I thought this might be a possible dup of PR91241 or PR89605 but was unable to reproduce with the GCC 8 or 9 compilers. The build succeeds with trunk if I change the optimization level to -O1 or remove -fno-inline.