[Bug middle-end/50966] [4.4/4.5/4.6/4.7 Regression] Missing 'is used uninitialized' warning (struct pointer dereference)
manu at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Nov 2 19:20:00 GMT 2011
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.
More information about the Gcc-bugs
mailing list