[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
Fri May 20 08:46:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45978
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to work| |4.7.0
Summary|[4.6/4.7 Regression] bogus |[4.6 Regression] bogus
|"array subscript is above |"array subscript is above
|array bounds" warning in |array bounds" warning in
|extremely simple code with |extremely simple code with
|no loops |no loops
--- Comment #6 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-05-20 08:19:59 UTC ---
The bug was indeed worked around in VRP by making it use the CCP engine.
It now sees
MEM[(struct Y *)&<retval> + 16B] = vect_cst_.6_11;
instead of &MEM[(struct Y *)&<retval>].ar[4] as a base which makes it not warn.
The vectorizer still uses that address as base though.
So I suppose we can say it's fixed in 4.7 by adjusting the pass that
emits the warning.
More information about the Gcc-bugs
mailing list