[Bug c/83703] Loop termination condition ignored in -O3, works in -O2 or with smaller values
freddie_chopin at op dot pl
gcc-bugzilla@gcc.gnu.org
Sat Jan 6 16:27:00 GMT 2018
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.
More information about the Gcc-bugs
mailing list