diff options
author | Jan Hubicka <jh@suse.cz> | 2013-12-16 11:52:48 +0100 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2013-12-16 10:52:48 +0000 |
commit | 3b4e93c3586ba3c7ceeb21a809c14e190ef0c997 (patch) | |
tree | 0cb8c61a80156dad8a2a1d1cbf4282a695a25f0e /gcc/ipa-devirt.c | |
parent | e9792e1d9d3c06ad57313443f21663f4c6626340 (diff) | |
download | gcc-3b4e93c3586ba3c7ceeb21a809c14e190ef0c997.zip gcc-3b4e93c3586ba3c7ceeb21a809c14e190ef0c997.tar.gz gcc-3b4e93c3586ba3c7ceeb21a809c14e190ef0c997.tar.bz2 |
re PR ipa/59473 (ice in get_class_context with -O3)
PR ipa/59473
* ipa-devirt.c (get_class_context): Do not ICE when type is found
at wrong offset.
From-SVN: r206012
Diffstat (limited to 'gcc/ipa-devirt.c')
-rw-r--r-- | gcc/ipa-devirt.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/ipa-devirt.c b/gcc/ipa-devirt.c index c1f8d87..f5b5926 100644 --- a/gcc/ipa-devirt.c +++ b/gcc/ipa-devirt.c @@ -848,6 +848,10 @@ get_class_context (ipa_polymorphic_call_context *context, 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; } |