This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/59933] for loop goes wild with assert() enabled
- From: "ian at g0tcd dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 29 Jan 2014 13:14:51 +0000
- Subject: [Bug c/59933] for loop goes wild with assert() enabled
- Auto-submitted: auto-generated
- References: <bug-59933-4 at http dot gcc dot gnu dot org/bugzilla/>
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.