[Bug c/59933] for loop goes wild with assert() enabled
ian at g0tcd dot com
gcc-bugzilla@gcc.gnu.org
Wed Jan 29 13:14:00 GMT 2014
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59933
--- Comment #3 from Ian Hamilton <ian at g0tcd dot com> ---
Just a thought.
Does ((int)(sizeof(NSQ_del_dec_struct) / sizeof(opus_int32)) correctly give you
the size of the sLPC_Q14 array?
>From playing with my test case, it seems that if the optimiser spots that k
will go beyond the end of your array, it doesn't bother checking it each time
round the loop, hence an infinte loop.
Seems that gcc 4.8's aggressive loop optimiser also gives up aggressively when
presented with invalid code.
More information about the Gcc-bugs
mailing list