From 27732ffd5852437ad67b4074edb70b8c29316590 Mon Sep 17 00:00:00 2001 From: Martin Liska Date: Wed, 3 Sep 2014 14:42:01 +0200 Subject: [PATCH] Fix for tree-ssa-pre * tree-ssa-sccvn.c (vn_reference_lookup_call): default (NULL) value is set to preserve uninitialized value for vnresult. From-SVN: r214873 --- gcc/ChangeLog | 5 +++++ gcc/tree-ssa-sccvn.c | 3 +++ 2 files changed, 8 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index cfec7b4c32f..e59e0d754b6 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2014-09-03 Martin Liska + + * 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 * config/nds32/nds32.c (nds32_must_pass_in_stack): New implementation diff --git a/gcc/tree-ssa-sccvn.c b/gcc/tree-ssa-sccvn.c index 1bcbde35f8a..44656ea0370 100644 --- a/gcc/tree-ssa-sccvn.c +++ b/gcc/tree-ssa-sccvn.c @@ -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; -- 2.30.2