This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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

--- Comment #33 from Manuel LÃpez-IbÃÃez <manu at gcc dot gnu.org> ---
(In reply to baoshan from comment #32)
> 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?

To be honest, I don't know, since neither loop-unrolling nor VRP are my
speciality. If you can figure out how the estimate can be improved in cunrolli,
that would be great. There are some functions called after that point that seem
to attempt to provide a more accurate estimate. One would need to go through
them carefully in GDB and find out why they fail. 

If itl cannot be fixed here, the info about valid ranges is still inaccurate,
that is, the loop may be unrolled into 6 iterations, but only 4 are ever
executed. There must be a way to teach VRP that this is the case and mark the
blocks as unreachable.

I hope other more knowledgeable devs will chime in, I'm out of ideas.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]