This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug lto/64043] [5 Regression] ICE (segfault) with LTO: in tree_check/tree.h:2758 get_binfo_at_offset/tree.c:11914
- From: "hubicka at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 12 Dec 2014 19:01:21 +0000
- Subject: [Bug lto/64043] [5 Regression] ICE (segfault) with LTO: in tree_check/tree.h:2758 get_binfo_at_offset/tree.c:11914
- Auto-submitted: auto-generated
- References: <bug-64043-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64043
--- Comment #8 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
The following patch should help. Still need to work out why flag_devirtualize
is set at final link - it should not
Index: tree.c
===================================================================
--- tree.c (revision 218658)
+++ tree.c (working copy)
@@ -11870,6 +11870,11 @@
if (TREE_CODE (target) == FUNCTION_TYPE)
return false;
gcc_checking_assert (TREE_CODE (target) == METHOD_TYPE);
+ /* If we do not have BINFO associated, it means that type was built
+ without devirtualization enabled. Do not consider this a virtual
+ call. */
+ if (!TYPE_BINFO (obj_type_ref_class (target)))
+ return false;
return true;
}