To: gcc-patches@gcc.gnu.org Subject: [PATCH] fix -Werror=maybe-uninitialized in tree-ssa-loop-ivopts.c (PR bootstrap/50218) The recent r178104 change to tree-ssa-loop-ivopts.c broke bootstrap on i686-linux because stage2 gcc considers the variable 'comp' used but possibly uninitialized, see PR50218. Initializing it to ERROR_MARK solves the problem, and is consistent with how other parts of r178104 represent absent/impossible 'comp' values. Ok for trunk? (I don't have svn write access.) /Mikael gcc/ 2011-08-20 Mikael Pettersson PR bootstrap/50218 * tree-ssa-loop-ivopts.c (determine_use_iv_cost_condition): Initialize comp. --- gcc-4.7-20110827/gcc/tree-ssa-loop-ivopts.c.~1~ 2011-08-26 15:36:28.000000000 +0200 +++ gcc-4.7-20110827/gcc/tree-ssa-loop-ivopts.c 2011-08-28 10:13:34.000000000 +0200 @@ -4757,7 +4757,7 @@ determine_use_iv_cost_condition (struct bool ok; int elim_inv_expr_id = -1, express_inv_expr_id = -1, inv_expr_id; tree *control_var, *bound_cst; - enum tree_code comp; + enum tree_code comp = ERROR_MARK; /* Only consider real candidates. */ if (!cand->iv)