ipa-polymorphic-call.c (ipa_polymorphic_call_context): Avoid ICE on getting VOID...
authorJan Hubicka <hubicka@ucw.cz>
Mon, 9 Feb 2015 20:24:55 +0000 (21:24 +0100)
committerJan Hubicka <hubicka@gcc.gnu.org>
Mon, 9 Feb 2015 20:24:55 +0000 (20:24 +0000)
* ipa-polymorphic-call.c (ipa_polymorphic_call_context): Avoid ICE
on getting VOID pointer.

From-SVN: r220545

gcc/ChangeLog
gcc/ipa-polymorphic-call.c

index 78c1af1e2e4a792b487b04c1c7973cc3290f2de9..e661a9d71682b61a8d9eb085106f416f3b0e7057 100644 (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
index 5ad5e517fed7a5209b56dc05560f063a3b90ed06..aaa549e03d39238d1921f6d943cf0f486550cacf 100644 (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 */);