[Bug tree-optimization/66186] [4.9/5/6 Regression] wrong code at -O3 on x86_64-linux-gnu

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon May 18 07:05:00 GMT 2015


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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2015-05-18
                 CC|                            |jakub at gcc dot gnu.org
            Summary|wrong code at -O3 on        |[4.9/5/6 Regression] wrong
                   |x86_64-linux-gnu            |code at -O3 on
                   |                            |x86_64-linux-gnu
     Ever confirmed|0                           |1

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Started with r204458.  But most likely this is yet another case of the RTL bug
where stack pointer based accesses are considered as non-trapping, despite
being clearly out of bounds.
The pcom change only changed
f_I_lsm0.4_7 = f[65535];
which the compiler can see as being out of bounds access quickly (note, f is
int f[2]), but after the pcom change it uses
f_I_lsm0.4_7 = MEM[(int *)&f + 262140B];
and for some reason we don't consider that as clearly out of bounds access.



More information about the Gcc-bugs mailing list