http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57367
--- Comment #7 from Richard Biener <rguenth at gcc dot gnu.org> --- (In reply to Paolo Carlini from comment #6) > Disappointing, Richard, that in 4.8/4.9 (vs 4.7) we don't seem to warn at > all for the testcase in Comment#4 too. I'm wondering if the tree-vrp.c check > couldn't be done a bit earlier, I don't know. In 4.8/4.9 we optimize away the code and constant-propagate to the printf (warning is inlined) before VRP. -O2 -fno-inline warns. I've repeatedly said that the proper place for static analysis is IPA time before early optimizers are running. You can trivially setup constant/copy propagation without doing the actual transform there.