ipa-polymorphic-call.c (ipa_polymorphic_call_context): Avoid ICE on getting VOID pointer.

* ipa-polymorphic-call.c (ipa_polymorphic_call_context): Avoid ICE
	on getting VOID pointer.

From-SVN: r220545
This commit is contained in:
Jan Hubicka 2015-02-09 21:24:55 +01:00 committed by Jan Hubicka
parent a02f26f6d8
commit 62c7e4b748
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2015-02-08 Jan Hubicka <hubicka@ucw.cz>
* ipa-polymorphic-call.c (ipa_polymorphic_call_context): Avoid ICE
on getting VOID pointer.
2015-02-09 Jakub Jelinek <jakub@redhat.com>
PR target/64979

View File

@ -1078,7 +1078,7 @@ ipa_polymorphic_call_context::ipa_polymorphic_call_context (tree fndecl,
base_type = TREE_TYPE (gimple_assign_rhs1
(SSA_NAME_DEF_STMT (base_pointer)));
if (POINTER_TYPE_P (base_type))
if (base_type && POINTER_TYPE_P (base_type))
combine_speculation_with (TYPE_MAIN_VARIANT (TREE_TYPE (base_type)),
offset,
true, NULL /* Do not change type here */);