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/45978] [4.6 Regression] bogus "array subscript is above array bounds" warning in extremely simple code with no loops


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.


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