------- Comment #3 from dcb314 at hotmail dot com 2006-12-18 09:53 ------- (In reply to comment #1) > then it can only be postive
Plausible, but I don't think so. The executed code displays a negative number after about 64 iterations, then displays about thirty zeros. There is one set bit in local variable n, and it gets moved up once per iteration. At the last but one iteration, n goes negative, because the sign bit is set. Then n goes to zero. Then the test for n == 0 mysteriously fails in the optimiser. I'd be interested to see what execution you get on your machine for this code. -- dcb314 at hotmail dot com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |UNCONFIRMED Resolution|INVALID | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30245