http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60527
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |INVALID --- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- You have an integer overflow in your code which is why the comparisons are being removed. if (tmp == INT_MIN) Can never happen because B is always a positive constant (411), so tmp has a range of [INT_MIN+411. INT_MAX]. The only way to get INT_MIN is if you had an overflow and overflows in C are undefined.