Fix for tree-ssa-pre
authorMartin Liska <mliska@suse.cz>
Wed, 3 Sep 2014 12:42:01 +0000 (14:42 +0200)
committerMartin Liska <marxin@gcc.gnu.org>
Wed, 3 Sep 2014 12:42:01 +0000 (12:42 +0000)
* tree-ssa-sccvn.c (vn_reference_lookup_call): default (NULL) value
is set to preserve uninitialized value for vnresult.

From-SVN: r214873

gcc/ChangeLog
gcc/tree-ssa-sccvn.c

index cfec7b4c32f8ac96ca7740da143f67a032d1985d..e59e0d754b65771d2502cf7ff94c0066b0a7a5e1 100644 (file)
@@ -1,3 +1,8 @@
+2014-09-03  Martin Liska  <mliska@suse.cz>
+
+       * tree-ssa-sccvn.c (vn_reference_lookup_call): default (NULL) value
+       is set to set uninitialized value for vnresult.
+
 2014-09-03  Chung-Ju Wu  <jasonwucj@gmail.com>
 
        * config/nds32/nds32.c (nds32_must_pass_in_stack): New implementation
index 1bcbde35f8a922a715c966bc975d9d9f5d24a78f..44656ea0370595e441c0292bac6139cb0f649ab2 100644 (file)
@@ -2146,6 +2146,9 @@ void
 vn_reference_lookup_call (gimple call, vn_reference_t *vnresult,
                          vn_reference_t vr)
 {
+  if (vnresult)
+    *vnresult = NULL;
+
   tree vuse = gimple_vuse (call);
 
   vr->vuse = vuse ? SSA_VAL (vuse) : NULL_TREE;