This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
PR ipa/59473 (ICE in get_class_context)
- From: Jan Hubicka <hubicka at ucw dot cz>
- To: gcc-patches at gcc dot gnu dot org
- Date: Mon, 16 Dec 2013 11:54:05 +0100
- Subject: PR ipa/59473 (ICE in get_class_context)
- Authentication-results: sourceware.org; auth=none
Hi,
the problem here is that we ICE on an assert that crept in from earliler
stages of development where I wondered if we can hit this somewhat odd situation.
Fixed thus.
Honza
Index: ChangeLog
===================================================================
--- ChangeLog (revision 206011)
+++ ChangeLog (working copy)
@@ -1,3 +1,9 @@
+2013-12-14 Jan Hubicka <jh@suse.cz>
+
+ PR ipa/59473
+ * ipa-devirt.c (get_class_context): Do not ICE when type is found
+ at wrong offset.
+
2013-12-16 Jakub Jelinek <jakub@redhat.com>
PR libgomp/58756
Index: ipa-devirt.c
===================================================================
--- ipa-devirt.c (revision 205992)
+++ ipa-devirt.c (working copy)
@@ -848,6 +848,10 @@ get_class_context (ipa_polymorphic_call_
if (TREE_CODE (type) == TREE_CODE (expected_type)
&& types_same_for_odr (type, expected_type))
{
+ /* Type can not contain itself on an non-zero offset. In that case
+ just give up. */
+ if (offset != 0)
+ goto give_up;
- gcc_assert (offset == 0);
return true;
}