This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/50966] [4.4/4.5/4.6/4.7 Regression] Missing 'is used uninitialized' warning (struct pointer dereference)
- From: "manu at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 02 Nov 2011 19:19:39 +0000
- Subject: [Bug middle-end/50966] [4.4/4.5/4.6/4.7 Regression] Missing 'is used uninitialized' warning (struct pointer dereference)
- Auto-submitted: auto-generated
- References: <bug-50966-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50966
--- Comment #1 from Manuel LÃpez-IbÃÃez <manu at gcc dot gnu.org> 2011-11-02 19:19:39 UTC ---
Well, it did fix one of the oldest false positives in GCC:
PR middle-end/179
* tree-ssa.c (warn_uninit): Do not warn for variables that can be
initialized outside the current module.
(warn_uninitialized_var): Ignore left-hand side when walking the
trees. Ignore address expressions. Examine VUSE operands in gimple
statements with a variable declaration on the right-hand side.
testsuite/
* gcc.dg/uninit-6.c (make_something): Remove XFAIL.
* gcc.dg/uninit-6-O0.c (make_something): Remove XFAIL.
* gcc.dg/uninit-B.c (baz): Remove XFAIL.
* gcc.dg/uninit-B-2.c: New.
* gcc.dg/uninit-B-O0-2.c: New.
* gcc.dg/uninit-pr19430-O0.c: New.
* gcc.dg/uninit-pr19430.c: New.
* gcc.dg/uninit-pr19430-2.c: New.
so I think it is a good trade-off.
This may be easy to fix, but I don't have enough free time to look at it, and
the uninitialized warning code has changed a lot since that revision, so anyone
has as good chance to fix this as me. If you want some tips on where to start,
just let me know.