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 ipa/62121] [4.9 Regression] ICE: Segmentation fault in ipa-devirt.c:997


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62121

--- Comment #4 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
I am testing the following for 4.9 branch:
Index: ipa-devirt.c
===================================================================
--- ipa-devirt.c        (revision 215890)
+++ ipa-devirt.c        (working copy)
@@ -994,7 +994,8 @@ give_up:
   if ((TREE_CODE (type) != RECORD_TYPE
        || !TYPE_BINFO (type)
        || !polymorphic_type_binfo_p (TYPE_BINFO (type)))
-      && (TREE_CODE (TYPE_SIZE (type)) != INTEGER_CST
+      && (!TYPE_SIZE (type)
+         || TREE_CODE (TYPE_SIZE (type)) != INTEGER_CST
          || (offset + tree_to_uhwi (TYPE_SIZE (expected_type)) <=
              tree_to_uhwi (TYPE_SIZE (type)))))
     return true;


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