Created attachment 26231 [details] Code that should warn gcc fails to emit the "is used uninitialized in this function" warning, if the offending variable is initialized via a function later on. See attachment. If compiled with gcc -Wall bug.c gcc issues no warning. If line 13 is commented out, the correct bug.c:11:9: warning: ‘offender’ is used uninitialized in this function [-Wuninitialized] is emitted. I think it's not the same as #18501, because replacing line 13 with offencer = 0; still produces the warning correctly.
This is a dup of PR50040, fixed for GCC 4.7. Note that you need to enable optimization to get the warning there. *** This bug has been marked as a duplicate of bug 50040 ***
confirmed it's fixed in 4.7