http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60319
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2014-02-24 Ever confirmed|0 |1 --- Comment #6 from Richard Biener <rguenth at gcc dot gnu.org> --- (In reply to Zhendong Su from comment #5) > Did you separately compile the two files at -O0 and link at -Os, like below? > > > $ gcc-trunk -flto -O0 -c foo.c > > $ gcc-trunk -flto -O0 -c main.c > > $ gcc-trunk -flto -Os foo.o main.o Ah, no. The issue here is that the fix for that bug I mention triggers on TYPE_OVERFLOW_UNDEFINED, but with -O[01] we have -fno-strict-overflow enabled and thus we lower it in a bogus way while with -O[s23] we have -fstrict-overflow. This is a IL semantic change that is not actually contained in the IL ... Anyway, confirmed.