https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71539
--- Comment #2 from cubitect at gmail dot com --- Thank you for the tip! I was unaware that signed integer overflow is undefined in standard C. I was rewriting some java code in C when I ran into this problem, so this makes sense now. (Though I still don't see how this caused the loop to abort prematurely.)