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 #27 from baoshan <pangbw at gmail dot com> ---
> It seems GCC at some moment unrolls the loop and creates such block with
> those ranges. Probably, the block is unreachable, but it would be better to
> not create it in the first place. Finding out where and why it is created
> would help to figure out a fix.


At pass "cunrolli", it would unroll the loops according the estimated iterate
times. The problem is at this time it use array ref(infer_loop_bounds_from_ref)
to infer the iterate times which is not accurate. The inaccurate iterate times
result the extra blocks.

I am not sure which way to go at this point. Should we add value range
propagation in/before "cunrolli" so we can get the accurate iterate times? or
We just disable the warning being reported at "vrp" pass?


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