This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug ipa/62121] [4.9 Regression] ICE: Segmentation fault in ipa-devirt.c:997
- 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: Sat, 04 Oct 2014 21:35:56 +0000
- Subject: [Bug ipa/62121] [4.9 Regression] ICE: Segmentation fault in ipa-devirt.c:997
- Auto-submitted: auto-generated
- References: <bug-62121-4 at http dot gcc dot gnu dot org/bugzilla/>
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;