http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57343
Marc Glisse <glisse at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |wrong-code Component|rtl-optimization |tree-optimization --- Comment #1 from Marc Glisse <glisse at gcc dot gnu.org> --- Reduced a bit: int printf (const char *, ...); int c = 0; int main () { int i; int f = 1; for (i = 0; i < 5; i++) { --c; unsigned char h = c * 100; if (h == 0) { f = 0; break; } } printf ("%d\n", f); return 0; } -O1 is enough. Disabling cunroll seems to help.