[Bug middle-end/50950] warning missed when OR'ing to an uninitialized variable

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

--- Comment #1 from Richard Guenther  2011-11-02 
09:48:16 UTC ---
No, it's the lame warning-for-uninitialized-memory (your variables are
address-taken) code that triggered in 4.4 but not in newer releases.
Thus it's more related to PR50040.

Note that I don't think we should warn for bitwise OR with 1 (but we should for
bitwise AND), the testcase will simply make one bit initialized, not
using any uninitialized info.  Thus not warning for this particular case is
good.


[Bug middle-end/50950] warning missed when OR'ing to an uninitialized variable

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

Richard Guenther  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||DUPLICATE

--- Comment #2 from Richard Guenther  2011-11-02 
09:49:45 UTC ---
A dup actually (fixed on trunk):

t.c: In function 'f0':
t.c:14:5: warning: 'x' is used uninitialized in this function [-Wuninitialized]
t.c: In function 'f1':
t.c:22:11: warning: 'x.i32.i' is used uninitialized in this function
[-Wuninitialized]
t.c: In function 'ff1':
t.c:30:5: warning: 'x' is used uninitialized in this function [-Wuninitialized]
t.c: In function 'ff2':
t.c:40:11: warning: 'y.i32.i' is used uninitialized in this function
[-Wuninitialized]

even better than for 4.4.

*** This bug has been marked as a duplicate of bug 50040 ***


[Bug middle-end/50950] warning missed when OR'ing to an uninitialized variable

2011-11-02 Thread sezeroz at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50950

--- Comment #3 from Ozkan Sezer  2011-11-02 11:29:20 
UTC ---
(In reply to comment #2)
> A dup actually (fixed on trunk):
> 

Thank you.  Can we expect a backport of the fix to 4.5 and 4.6?

> t.c: In function 'f0':
> t.c:14:5: warning: 'x' is used uninitialized in this function 
> [-Wuninitialized]
> t.c: In function 'f1':
> t.c:22:11: warning: 'x.i32.i' is used uninitialized in this function
> [-Wuninitialized]
> t.c: In function 'ff1':
> t.c:30:5: warning: 'x' is used uninitialized in this function 
> [-Wuninitialized]
> t.c: In function 'ff2':
> t.c:40:11: warning: 'y.i32.i' is used uninitialized in this function
> [-Wuninitialized]
> 
> even better than for 4.4.

Hmm, the warning is still selectively emitted only for the first uninitialized
variable, though.