]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - gcc/tree-ssa-pre.c
gcc/
[thirdparty/gcc.git] / gcc / tree-ssa-pre.c
index df2a13867d1f5da397cd02f87631b70c1d7a6b68..ee9ee6fe080844f8a9388abd2b9030601e5a6e8f 100644 (file)
@@ -2657,11 +2657,13 @@ compute_antic (void)
 }
 
 /* Return true if we can value number the call in STMT.  This is true
-   if we have a pure or constant call.  */
+   if we have a pure or constant call to a real function.  */
 
 static bool
 can_value_number_call (gimple stmt)
 {
+  if (gimple_call_internal_p (stmt))
+    return false;
   if (gimple_call_flags (stmt) & (ECF_PURE | ECF_CONST))
     return true;
   return false;
@@ -4384,6 +4386,8 @@ eliminate (void)
            {
              tree orig_fn = gimple_call_fn (stmt);
              tree fn;
+             if (!orig_fn)
+               continue;
              if (TREE_CODE (orig_fn) == SSA_NAME)
                fn = VN_INFO (orig_fn)->valnum;
              else if (TREE_CODE (orig_fn) == OBJ_TYPE_REF