https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77436
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |NEW Last reconfirmed| |2016-08-31 Resolution|INVALID |--- Ever confirmed|0 |1 --- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Now the following program does not have any overflow in it (only wrapping) and still causes wrong code: int main(int argc, char *argv[]) { unsigned sum = 0; for (int x = -(0x7fffffff -1); x <= (0x7fffffff -1); x++) sum += x; printf("%08x\n", sum); return 0; }