[Bug middle-end/50966] [4.4/4.5/4.6/4.7 Regression] Missing 'is used uninitialized' warning (struct pointer dereference)

2011-11-02 Thread manu at gcc dot gnu.org
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.


[Bug middle-end/50966] [4.4/4.5/4.6/4.7 Regression] Missing 'is used uninitialized' warning (struct pointer dereference)

2011-11-02 Thread manu at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50966

--- Comment #2 from Manuel López-Ibáñez manu at gcc dot gnu.org 2011-11-02 
19:24:44 UTC ---
BTW, this could actually be a duplicate of PR19430, if bar uninitialized use
appears in a PHI op. One would need to look at the dumps and put a breakpoint
at the warning point to see what is going on.


[Bug middle-end/50966] [4.4/4.5/4.6/4.7 Regression] Missing 'is used uninitialized' warning (struct pointer dereference)

2011-11-02 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50966

Richard Guenther rguenth at gcc dot gnu.org changed:

   What|Removed |Added

 Status|UNCONFIRMED |WAITING
   Last reconfirmed||2011-11-02
 Ever Confirmed|0   |1

--- Comment #3 from Richard Guenther rguenth at gcc dot gnu.org 2011-11-02 
21:00:53 UTC ---
There is no dereference of bar in the testcase.  What is there is an
address computation based on bar, that should certainly be warned on.
And I do see that warning with trunk (but not with 4.5 or 4.6, I suppose
my uninit TLC patch somehow fixed this):

$ ./cc1 -quiet t.c -Wall
t.c: In function 'main':
t.c:10:20: warning: 'bar' is used uninitialized in this function
[-Wuninitialized]

so, what is your real issue?


[Bug middle-end/50966] [4.4/4.5/4.6/4.7 Regression] Missing 'is used uninitialized' warning (struct pointer dereference)

2011-11-02 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50966

--- Comment #4 from Richard Guenther rguenth at gcc dot gnu.org 2011-11-02 
21:03:16 UTC ---
Btw, I'm talking about the fix for PR50040.


[Bug middle-end/50966] [4.4/4.5/4.6/4.7 Regression] Missing 'is used uninitialized' warning (struct pointer dereference)

2011-11-02 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50966

Richard Guenther rguenth at gcc dot gnu.org changed:

   What|Removed |Added

 CC||rguenth at gcc dot gnu.org
   Target Milestone|--- |4.4.7