https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65812
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2015-04-20 Ever confirmed|0 |1 --- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> --- This is because at the point where we warn we don't know that the code is executed unconditionally and with optimization we don't warn about maybe-uninitialized uses early. Late we have removed all code as dead and thus do not warn either. I'd say it works as intended (even though surprising).