This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/50040] [4.5/4.6/4.7 Regression] missed warning: âx.yâ is used uninitialized in this function
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 11 Aug 2011 14:28:39 +0000
- Subject: [Bug middle-end/50040] [4.5/4.6/4.7 Regression] missed warning: âx.yâ is used uninitialized in this function
- Auto-submitted: auto-generated
- References: <bug-50040-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50040
--- Comment #5 from Richard Guenther <rguenth at gcc dot gnu.org> 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 <rguenther@suse.de>
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