[Bug tree-optimization/59124] [4.9/5/6 Regression] Wrong warnings "array subscript is above array bounds"

pangbw at gmail dot com gcc-bugzilla@gcc.gnu.org
Tue Sep 22 20:06:00 GMT 2015


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59124

--- Comment #32 from baoshan <pangbw at gmail dot com> ---
(In reply to Manuel López-Ibáñez from comment #30)
> (In reply to baoshan from comment #29)
> > > However, it is clear that _14 = baz[_9] is executed only 5 times (not 5
> > > times + 1). Why is this estimate wrong?
> > 
> > The max value of n is 6, so the max value of i is 5 as "i < n", then the max
> > value of j is 4 as "j = i - 1" which means the max iterate times is 4.
> 
> True! Well, that reinforces my point that something is very wrong in the
> estimation. What is it?

And I think it is not wrong, it's just inaccurate, and it is not making any
wrong result in running time.

Can you point me how to proceed?


More information about the Gcc-bugs mailing list