re PR fortran/15620 (Statement functions and optimization cause IC)
authorPaul Brook <paul@codesourcery.com>
Sun, 30 May 2004 14:37:25 +0000 (14:37 +0000)
committerPaul Brook <pbrook@gcc.gnu.org>
Sun, 30 May 2004 14:37:25 +0000 (14:37 +0000)
commit7b5b57b7dc68b67c1e39eb88d41d377ba96c6606
tree00a8818dcf5ba37c109c3fc7ee836662eddd859e
parent7a70d70c54f4b73e25f7860f56bcd8f9e532f16c
re PR fortran/15620 (Statement functions and optimization cause IC)

PR fortran/15620
* trans-decl.c (gfc_shadow_sym, gfc_restore_sym): New functions.
* trans-expr.c (gfc_trans_string_copy): New function.
(gfc_conv_statement_function): Use them.  Create temp vars.  Enforce
character lengths.
(gfc_conv_string_parameter): Use gfc_trans_string_copy.
* trans-stmt.c (gfc_trans_forall_1): Use gfc_{shadow,restore}_sym.
* trans.h (struct gfc_saved_var): Define.
(gfc_shadow_sym, gfc_restore_sym): Add prototypes.
testsuite/
* gfortran.fortran-torture/execute/st_function_1.f90: New test.
* gfortran.fortran-torture/execute/st_function_2.f90: New test.

From-SVN: r82452
gcc/fortran/ChangeLog
gcc/fortran/trans-decl.c
gcc/fortran/trans-expr.c
gcc/fortran/trans-stmt.c
gcc/fortran/trans.h
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.fortran-torture/execute/st_function_1.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.fortran-torture/execute/st_function_2.f90 [new file with mode: 0644]