https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92600
Martin Liška <marxin at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|needs-bisection, | |needs-reduction | Target|powerpc64le-unknown-linux-g |powerpc64le-unknown-linux-g |nu |nu, x86_64-linux-gnu Host|powerpc64le-unknown-linux-g |powerpc64le-unknown-linux-g |nu |nu, x86_64-linux-gnu Assignee|marxin at gcc dot gnu.org |hubicka at gcc dot gnu.org Summary|ICE: lto1: internal |ICE: symtab_node::verify |compiler error: |failed, building |symtab_node::verify failed, |523.xalancbmk_r with -flto |building 523.xalancbmk_r |-fno-inline |with -flto -fno-inline | Build|powerpc64le-unknown-linux-g |powerpc64le-unknown-linux-g |nu |nu, x86_64-linux-gnu --- Comment #2 from Martin Liška <marxin at gcc dot gnu.org> --- Apparently, it's a very old issue, started with GCC 5.1.0: $ cat 1.ii namespace xercesc_2_7 { class XercesDOMParser { void resetEntities(); }; void XercesDOMParser::resetEntities() {} } // namespace xercesc_2_7 $ cat 2.ii namespace xercesc_2_7 { class XMLErrorReporter { public: virtual ~XMLErrorReporter(); }; class XMLEntityHandler { virtual void resetEntities(); }; class AbstractDOMParser : XMLErrorReporter, XMLEntityHandler {}; class XercesDOMParser : AbstractDOMParser { void resetEntities(); }; inline void XercesDOMParser::resetEntities() {} } // namespace xercesc_2_7 $ g++ -flto=16 -O2 -fno-inline 1.ii 2.ii 2.ii:10:7: warning: type 'struct XercesDOMParser' violates the C++ One Definition Rule [-Wodr] 10 | class XercesDOMParser : AbstractDOMParser { | ^ 1.ii:2:7: note: a type with different bases is defined in another translation unit 2 | class XercesDOMParser { | ^ 2.ii:13:13: warning: type of 'resetEntities' does not match original declaration [-Wlto-type-mismatch] 13 | inline void XercesDOMParser::resetEntities() {} | ^ 1.ii:5:6: note: 'resetEntities' was previously declared here 5 | void XercesDOMParser::resetEntities() {} | ^ lto1: error: Alias and target's section differs _ZN11xercesc_2_715XercesDOMParser13resetEntitiesEv/0 (resetEntities) @0x7f80058ea580 Type: function definition analyzed Visibility: externally_visible prevailing_def_ironly public Address is taken. References: Referring: *.LTHUNK0/2 (alias)_ZTVN11xercesc_2_715XercesDOMParserE/4 (addr) Read from file: /tmp/cc2Oyr2J.o Function flags: count:1073741824 (estimated locally) Called by: Calls: lto1: error: Alias and target's comdat groups differs _ZN11xercesc_2_715XercesDOMParser13resetEntitiesEv/0 (resetEntities) @0x7f80058ea580 Type: function definition analyzed Visibility: externally_visible prevailing_def_ironly public Address is taken. References: Referring: *.LTHUNK0/2 (alias)_ZTVN11xercesc_2_715XercesDOMParserE/4 (addr) Read from file: /tmp/cc2Oyr2J.o Function flags: count:1073741824 (estimated locally) Called by: Calls: *.LTHUNK0/2 (*.LTHUNK0) @0x7f80058ea840 Type: function definition analyzed alias Visibility: comdat_group:_ZN11xercesc_2_715XercesDOMParser13resetEntitiesEv section:.text._ZN11xercesc_2_715XercesDOMParser13resetEntitiesEv (implicit_section) artificial Same comdat group as: _ZThn8_N11xercesc_2_715XercesDOMParser13resetEntitiesEv/3 References: _ZN11xercesc_2_715XercesDOMParser13resetEntitiesEv/0 (alias) Referring: Read from file: /tmp/ccixDNgJ.o Function flags: Called by: _ZThn8_N11xercesc_2_715XercesDOMParser13resetEntitiesEv/3 (can throw external) Calls: during IPA pass: pure-const lto1: internal compiler error: verify_cgraph_node failed 0x88e42e cgraph_node::verify_node() /home/marxin/Programming/gcc/gcc/cgraph.c:3411 0x880d8c symtab_node::verify() /home/marxin/Programming/gcc/gcc/symtab.c:1268 0x8824ff symtab_node::verify_symtab_nodes() /home/marxin/Programming/gcc/gcc/symtab.c:1288 0xaf0f5f symtab_node::checking_verify_symtab_nodes() /home/marxin/Programming/gcc/gcc/cgraph.h:648 0xaf0f5f symbol_table::remove_unreachable_nodes(_IO_FILE*) /home/marxin/Programming/gcc/gcc/ipa.c:667 0x80c54e read_cgraph_and_symbols(unsigned int, char const**) /home/marxin/Programming/gcc/gcc/lto/lto-common.c:2910 0x7f2da2 lto_main() /home/marxin/Programming/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: g++ returned 1 exit status compilation terminated. /usr/bin/ld: error: lto-wrapper failed collect2: error: ld returned 1 exit status