[vta, vta4.4] avoid crash expanding &r[N] in debug stmt

Alexandre Oliva aoliva@redhat.com
Wed Aug 5 08:04:00 GMT 2009


It may happen (gcc.c-torture/execute/921013-1.c on ppc64 -O3) that
optimizing access to an array make it a non-addressable pseudo, while
addresses of array members survive in debug stmts.

We expand r[i] into a nice subreg when i < N, N being the array length,
but when i == N, we attempted to create an invalid SUBREG, which ICEd.

This patch catches this condition and gives up on computing a
location/value expression for the object that no longer exists.

I'm installing it in the vta and vta4.4 branches.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: vta-cfgexpand-post-end-subreg.patch
Type: text/x-patch
Size: 1454 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20090805/9f838423/attachment.bin>
-------------- next part --------------

-- 
Alexandre Oliva, freedom fighter    http://FSFLA.org/~lxoliva/
You must be the change you wish to see in the world. -- Gandhi
Be Free! -- http://FSFLA.org/   FSF Latin America board member
Free Software Evangelist      Red Hat Brazil Compiler Engineer


More information about the Gcc-patches mailing list