From c375a3a4ef026031d8116df122fa0193eb6a922f Mon Sep 17 00:00:00 2001
From: David Li <davidxl@google.com>
Date: Mon, 23 May 2011 16:17:28 +0000
Subject: [PATCH] fix pr48988

From-SVN: r174077
---
 gcc/ChangeLog         | 6 ++++++
 gcc/tree-ssa-uninit.c | 2 ++
 2 files changed, 8 insertions(+)

diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index b583601845a..a3cb0f1087a 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2011-05-23  David Li  <davidxl@google.com>
+
+	PR tree-optimization/48988
+	* tree-ssa-uninit.c (convert_control_dep_chain_into_preds):
+	Initialize has_valid_pred for each pred chain.
+
 2011-05-23  Richard Guenther  <rguenther@suse.de>
 
 	* gimple.c (gimple_types_compatible_p_1): Always compare type names.
diff --git a/gcc/tree-ssa-uninit.c b/gcc/tree-ssa-uninit.c
index 7ddce32a62f..c6da47b6cd9 100644
--- a/gcc/tree-ssa-uninit.c
+++ b/gcc/tree-ssa-uninit.c
@@ -358,6 +358,8 @@ convert_control_dep_chain_into_preds (VEC(edge, heap) **dep_chains,
   for (i = 0; i < num_chains; i++)
     {
       VEC(edge, heap) *one_cd_chain = dep_chains[i];
+
+      has_valid_pred = false;
       for (j = 0; j < VEC_length (edge, one_cd_chain); j++)
         {
           gimple cond_stmt;