https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83703
--- Comment #2 from Freddie Chopin <freddie_chopin at op dot pl> --- Indeed, reducing the values in `in[]` makes the code behave properly. But anyway - how does this particular (minor) issue in the code affect a seemingly unrelated loop? After all, this loop's variable - `b1` - is never modified apart from the loop's incrementation... I'm not saying that this example code is perfectly valid (it was a quick and dirty test of something else), but the behaviour observed with -O3 is really surprising.