[patch, fortran] Implement constant-folding for TRANSFER intrinsic.
Brooks Moses
brooks.moses@codesourcery.com
Fri May 11 22:46:00 GMT 2007
This patch adds the long-awaited implementation for constant-folding for
the TRANSFER intrinsic. It's essentially the same as the provisional
one that I posted a few weeks ago, with the addition of two testcases
provided by Paul Thomas.
As noted earlier, this implementation is entirely independent of the
build system's memory representation; all of the transfers of values
from gfc_expr representations to memory representations are done using
the middle-end functions in fold-const.c, which are what it uses for
similar constant-folding. The in-memory size of expressions is
calculated using the same code as the fold-const.c functions use.
(As I shall have limited net access for the next week, Paul and FX have
generously offered to address any final tweaks that need to be made to
this.)
Regression tested on powerpc-apple-darwin8.9.0 (and slightly earlier
versions tested on i686-pc-linux-gnu). Ok for trunk?
- Brooks
---------------------------------------------------------------------
2007-05-11 Brooks Moses <brooks.moses@codesourcery.com>
PR fortran/18769
PR fortran/30881
PR fortran/31194
PR fortran/31216
PR fortran/31427
* target-memory.c: New file.
* target-memory.h: New file.
* simplify.c: Add #include "target-memory.h".
(gfc_simplify_transfer): Implement constant-
folding for TRANSFER intrinsic.
* Make-lang.in: Add dependencies on new target-memory.* files.
---------------------------------------------------------------------
2007-05-11 Paul Thomas <pault@gcc.gnu.org>
PR fortran/18769
PR fortran/30881
PR fortran/31194
PR fortran/31216
PR fortran/31427
* transfer_simplify_1.f90: New test.
* transfer_simplify_2.f90: New test.
---------------------------------------------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: transfer_2007-05-11.diff
Type: text/x-patch
Size: 24755 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20070511/f753032d/attachment.bin>
More information about the Gcc-patches
mailing list