From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13159 invoked by alias); 11 Aug 2011 14:29:55 -0000 Received: (qmail 13148 invoked by uid 22791); 11 Aug 2011 14:29:54 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,SARE_HEAD_8BIT_SPAM,SARE_SUB_ENC_UTF8x2 X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 11 Aug 2011 14:29:40 +0000 From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/50040] [4.5/4.6/4.7 Regression] missed warning:=?UTF-8?Q?=20=E2=80=98x?=.=?UTF-8?Q?y=E2=80=99=20is=20used=20uninitialized=20in=20this=20function?= Date: Thu, 11 Aug 2011 14:29:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Keywords: X-Bugzilla-Severity: minor X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: rguenth at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.5.4 X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2011-08/txt/msg01104.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50040 --- Comment #5 from Richard Guenther 2011-08-11 14:28:39 UTC --- Author: rguenth Date: Thu Aug 11 14:28:36 2011 New Revision: 177667 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=177667 Log: 2011-08-11 Richard Guenther PR middle-end/50040 * gimplify.c (gimplify_modify_expr_complex_part): Mark the load of the other piece with TREE_NO_WARNING. * tree-flow.h (warn_uninit): Adjust prototype. * tree-ssa.c (warn_uninit): Take uninitialized SSA name, the base variable and the expression that is used separately. Properly query all TREE_NO_WARNING flags. (struct walk_data): Remove. (warn_uninitialized_var): Likewise. (warn_uninitialized_vars): Do not walk gimple pieces but simply look at all SSA uses of the statement. Handle unused memory separately. * tree-ssa-uninit.c (warn_uninitialized_phi): Adjust. * g++.dg/warn/unit-1.C: Un-XFAIL. * gcc.dg/uninit-I.c: Likewise. Modified: trunk/gcc/ChangeLog trunk/gcc/gimplify.c trunk/gcc/testsuite/g++.dg/warn/unit-1.C trunk/gcc/testsuite/gcc.dg/uninit-I.c trunk/gcc/tree-flow.h trunk/gcc/tree-ssa-uninit.c trunk/gcc/tree-ssa.c