http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56932



--- Comment #6 from Marc Glisse <glisse at gcc dot gnu.org> 2013-04-12 20:02:01 
UTC ---

(In reply to comment #4)

> Well, indeed increasing the array-size helps to avoid this issue.  
> Nevertheless

> I don't get why it produces wrong code for argument of call of function t 
> here.



At iteration i, you write to a[i], so i is obviously <250. This means that at

the next iteration, i<251, i+5<256, and the &0xff can be omitted.



> That there is a out-of-bounds access is one thing, but there is still wrong

> code produced.



Well, no, the program could have crashed for the out of bounds access before

even reaching the point where you noticed the "wrong code".



> Also why - if gcc already detects an out-of-bounds access -

> there is no warning for that?



There is a lot of progress to be made here...

Reply via email to