This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug lto/64043] [5 Regression] ICE (segfault) with LTO: in tree_check/tree.h:2758 get_binfo_at_offset/tree.c:11914


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;
 }


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]