[Bug tree-optimization/45978] [4.6 Regression] bogus "array subscript is above array bounds" warning in extremely simple code with no loops

rguenth at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Nov 15 12:05:00 GMT 2010


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

--- Comment #2 from Richard Guenther <rguenth at gcc dot gnu.org> 2010-11-15 12:00:20 UTC ---
Hmm, I'm not sure how to address this - we warn about the address-taking
operation which only at VRP time get's folded to &MEM[(struct Y
*)&<retval>].ar[4]
via maybe_fold_stmt_addition (which I only preserved to avoid some regressions
I don't remember anymore during mem-ref development).

Clearly even the first vectorized access spans more than the array (but we
could set TREE_NO_WARNING on the memory reference itself).



More information about the Gcc-bugs mailing list