From patchwork Thu Apr 17 16:43:40 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kyrylo Tkachov X-Patchwork-Id: 339982 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]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 2DB7B140088 for ; Fri, 18 Apr 2014 02:43:55 +1000 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:subject:content-type; q= dns; s=default; b=rSyOH6lQsG20APferZIQxSElXdJV9Iq3euDORkpxZsCCqV 4lgEiOJN7yukIzGDjbowOPOhdwwtU2Z58KC6kWa+RHRxIKsy3q009Jq4760snvKJ D74MMLRpQynxS2OvzGHevnyTaulVaOJIFkO9Y5xPhdB1v5V7CG53lDPbu/8Lc= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:subject:content-type; s= default; bh=dnINzDdAUnLlVf2rL7TpRfq5BAo=; b=Z9wHH/oxG4HckFlH5Jt8 rF3OnPPjrTwfq2IhgFRplHXZ3Lrv2dQEQmeqHa1VVq503AULn2D32y/1v86lrCEg UKzJjL+xrV97GMaP+lryB+V3Rq1BmKJDZM7ndb0sTmFK5CIq3e72ZKSkiAzE+V+C 6N4j25PBxhnfHfDz0MvS5eY= Received: (qmail 14566 invoked by alias); 17 Apr 2014 16:43:48 -0000 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 Received: (qmail 14554 invoked by uid 89); 17 Apr 2014 16:43:47 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: service87.mimecast.com Received: from service87.mimecast.com (HELO service87.mimecast.com) (91.220.42.44) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 17 Apr 2014 16:43:44 +0000 Received: from cam-owa2.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.21]) by service87.mimecast.com; Thu, 17 Apr 2014 17:43:42 +0100 Received: from [10.1.208.24] ([10.1.255.212]) by cam-owa2.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.3959); Thu, 17 Apr 2014 17:43:56 +0100 Message-ID: <535004BC.1040701@arm.com> Date: Thu, 17 Apr 2014 17:43:40 +0100 From: Kyrill Tkachov User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130804 Thunderbird/17.0.8 MIME-Version: 1.0 To: GCC Patches Subject: [PATCH] Fix uninitialised variable warning in tree-ssa-loop-ivcanon.c X-MC-Unique: 114041717434201501 X-IsSubscribed: yes Hi all, While looking at the build logs I noticed a warning while building tree-ssa-loop-ivcanon.c about a potential use of an uninitialised variable. This patchlet fixes that warning by initialising it to 0. Tested arm-none-eabi. Ok for trunk? 2014-04-17 Kyrylo Tkachov * tree-ssa-loop-ivcanon.c (canonicalize_loop_induction_variables): Initialise n_unroll to 0. diff --git a/gcc/tree-ssa-loop-ivcanon.c b/gcc/tree-ssa-loop-ivcanon.c index cdf1559..7a83b12 100644 --- a/gcc/tree-ssa-loop-ivcanon.c +++ b/gcc/tree-ssa-loop-ivcanon.c @@ -656,7 +656,7 @@ try_unroll_loop_completely (struct loop *loop, HOST_WIDE_INT maxiter, location_t locus) { - unsigned HOST_WIDE_INT n_unroll, ninsns, max_unroll, unr_insns; + unsigned HOST_WIDE_INT n_unroll = 0, ninsns, max_unroll, unr_insns; gimple cond; struct loop_size size; bool n_unroll_found = false;