https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64043
Bug ID: 64043 Summary: [5 Regression] ICE (segfault) with LTO: in tree_check/tree.h:2758 get_binfo_at_offset/tree.c:11914 Product: gcc Version: 5.0 Status: UNCONFIRMED Keywords: ice-on-valid-code Severity: normal Priority: P3 Component: lto Assignee: unassigned at gcc dot gnu.org Reporter: burnus at gcc dot gnu.org Created attachment 34087 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34087&action=edit Test case (unpack, run "make") Using GCC 5.0.0 20141121, the attached program fails with the following ICE. To reproduce: Unpack and hit "make". It will compile one.ii and two.ii and gcc-ar them to libonetwo.ii; it compiles three.ii - and then LTOs them together. (Requires an LD with plugin capabilities; I've put the git version of binutils into the path.) The failure is: 0xa36e4f crash_signal ../../gcc/toplev.c:359 0xc97211 tree_check(tree_node*, char const*, int, char const*, tree_code) ../../gcc/tree.h:2758 0xc97211 get_binfo_at_offset(tree_node*, long, tree_node*) ../../gcc/tree.c:11914 0x884cf4 possible_polymorphic_call_targets(tree_node*, long, ipa_polymorphic_call_context, bool*, void**, bool) ../../gcc/ipa-devirt.c:2404 0x7ef9d7 possible_polymorphic_call_targets(tree_node*, gimple_statement_base*, bool*, void**) ../../gcc/ipa-utils.h:126 0x7edcd0 gimple_fold_call ../../gcc/gimple-fold.c:2667 0x7edcd0 fold_stmt_1 ../../gcc/gimple-fold.c:3246 0xb55323 execute ../../gcc/tree-ssa-forwprop.c:2228