[PATCH] Fix Fortran/29410, transfer vs -O2
Andrew Pinski
pinskia@gmail.com
Mon Oct 30 07:08:00 GMT 2006
The problem here is that the Fortran front-end creates "*(typeof<mold>
*)&source" which is not alias friendly at all. We should be using
VIEW_CONVERT_EXPR instead which is more aliasing friendly.
This patch changes the front-end to produce VCE.
OK? Bootstrapped and tested on i686-linux-gnu with no regressions.
Thanks,
Andrew Pinski
fortran/ChangeLog:
* trans-intrinsic.c (gfc_conv_intrinsic_array_transfer):
Change over to create VIEW_CONVERT_EXPR instead of using an
ADDR_EXPR, a cast and then an indirect reference.
testsuite/ChangeLog:
* gfortran.fortran-torture/execute/transfer1.f90: New test.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fixtransfer.diff.txt
Type: text/x-patch
Size: 1651 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20061030/f149a4e0/attachment.bin>
More information about the Fortran
mailing list