http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59371
--- Comment #8 from Maciej W. Rozycki <ma...@linux-mips.org> --- Richard, I wasn't aware integer promotions applied here, thanks for pointing it out. New code is therefore correct while old one was not. Unfortunately neither -fwrapv nor -funsafe-loop-optimizations changes anything. Maciej