Hi,
this patch fixes ICE seen when compiling firefox with large unit growths.
The problem is that the speculative part of analysis trips over VOID pointer
and gets lost.

Bootstrapped/regtsted x86_64-linux, commited.

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

Index: ipa-polymorphic-call.c
===================================================================
--- ipa-polymorphic-call.c      (revision 220509)
+++ ipa-polymorphic-call.c      (working copy)
@@ -1078,7 +1078,7 @@ ipa_polymorphic_call_context::ipa_polymo
     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 */);

Reply via email to