http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51342
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> 2011-11-29 04:56:13 UTC --- static int n = 137; while ((n = n * 1103515245 + 12345) < 0); return n; You are checking for overflow which is undefined for signed integers in C. So your testcase is invalid and undefined.