From patchwork Sun Aug 28 09:43:07 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mikael Pettersson X-Patchwork-Id: 111900 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 15F4CB6F71 for ; Sun, 28 Aug 2011 19:43:27 +1000 (EST) Received: (qmail 26663 invoked by alias); 28 Aug 2011 09:43:24 -0000 Received: (qmail 26655 invoked by uid 22791); 28 Aug 2011 09:43:24 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD, TW_SV X-Spam-Check-By: sourceware.org Received: from fanny.its.uu.se (HELO fanny.its.uu.se) (130.238.4.241) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 28 Aug 2011 09:43:10 +0000 Received: from fanny.its.uu.se (localhost [127.0.0.1]) by fanny.its.uu.se (Postfix) with ESMTP id 6E778629B for ; Sun, 28 Aug 2011 11:43:08 +0200 (MSZ) Received: from pilspetsen.it.uu.se (pilspetsen.it.uu.se [130.238.18.39]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by fanny.its.uu.se (Postfix) with ESMTP id 31B8561E1 for ; Sun, 28 Aug 2011 11:43:08 +0200 (MSZ) Received: (from mikpe@localhost) by pilspetsen.it.uu.se (8.14.4+Sun/8.14.4) id p7S9h7uL006595; Sun, 28 Aug 2011 11:43:07 +0200 (MEST) MIME-Version: 1.0 Message-ID: <20058.3499.858364.515931@pilspetsen.it.uu.se> Date: Sun, 28 Aug 2011 11:43:07 +0200 From: Mikael Pettersson To: gcc-patches@gcc.gnu.org Subject: [PATCH] fix -Werror=maybe-uninitialized in tree-ssa-loop-ivopts.c (PR bootstrap/50218) Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org 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)