[Bug ipa/62121] [4.9 Regression] ICE: Segmentation fault in ipa-devirt.c:997
hubicka at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sat Oct 4 21:36:00 GMT 2014
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;
More information about the Gcc-bugs
mailing list