https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65361
Bug ID: 65361 Summary: [5 Regression] LTO: tree check: expected tree that contains ‘decl minimal’ structure, have ‘tree_binfo’ in add_type_duplicate, at ipa-devirt.c:1509 Product: gcc Version: 5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: lto Assignee: unassigned at gcc dot gnu.org Reporter: burnus at gcc dot gnu.org CC: hubicka at gcc dot gnu.org Created attachment 34989 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34989&action=edit one.ii Follow up to PR65276, PR65302 and PR65316, still for the same program - but I have the feeling, we are slowly getting there. The real-program's message is slightly different (get_odr_type, at ipa-devirt.c:1704). g++ -c -std=c++11 -flto -O2 two.ii one.ii gcc -r -nostdlib two.o one.o one.ii:66:21: warning: type ‘struct ctype’ violates one definition rule [-Wodr] template <> class ctype < char > ^ two.ii:51:21: note: a type with the same name but different number of polymorphic bases is defined in another translation unit template <> class ctype < char >:public locale::facet, public ctype_base ^ lto1: internal compiler error: tree check: expected tree that contains ‘decl minimal’ structure, have ‘tree_binfo’ in add_type_duplicate, at ipa-devirt.c:1509 0xca3d94 tree_contains_struct_check_failed(tree_node const*, tree_node_structure_enum, char const*, int, char const*) ../../gcc/tree.c:9468 0x8948ec contains_struct_check(tree_node*, tree_node_structure_enum, char const*, int, char const*) ../../gcc/tree.h:2960 0x8948ec add_type_duplicate ../../gcc/ipa-devirt.c:1508 0x8948ec get_odr_type(tree_node*, bool) ../../gcc/ipa-devirt.c:1763 0x89694f register_odr_type(tree_node*) ../../gcc/ipa-devirt.c:1839