diff options
author | Paul Thomas <pault@gcc.gnu.org> | 2014-02-01 18:50:41 +0000 |
---|---|---|
committer | Paul Thomas <pault@gcc.gnu.org> | 2014-02-01 18:50:41 +0000 |
commit | da78a067694a5bee1394a4bb2e7272214cb419bb (patch) | |
tree | 0754839255200a09b43ee9c4cd2f13648314144e /gcc/fortran/trans-array.c | |
parent | bca420ed5f40d58e929e1da497785ea2d745ebfb (diff) | |
download | gcc-da78a067694a5bee1394a4bb2e7272214cb419bb.zip gcc-da78a067694a5bee1394a4bb2e7272214cb419bb.tar.gz gcc-da78a067694a5bee1394a4bb2e7272214cb419bb.tar.bz2 |
re PR fortran/59906 (error: size of variable '<anonymous>' is too large)
2014-02-01 Paul Thomas <pault@gcc.gnu.org>
PR fortran/59906
* trans-stmt.c (gfc_add_loop_ss_code): In the case of character
SS_REFERENCE, use gfc_conv_string_parameter to ensure that a
pointer to the string is stored.
* trans-expr.c (gfc_conv_expr_reference): Likewise, use
gfc_conv_string_parameter to ensure that a pointer to is passed
to the elemental function.
2014-02-01 Paul Thomas <pault@gcc.gnu.org>
PR fortran/59906
* gfortran.dg/elemental_subroutine_9.f90 : New test
From-SVN: r207389
Diffstat (limited to 'gcc/fortran/trans-array.c')
-rw-r--r-- | gcc/fortran/trans-array.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/fortran/trans-array.c b/gcc/fortran/trans-array.c index 0f5375d..8e7b75e 100644 --- a/gcc/fortran/trans-array.c +++ b/gcc/fortran/trans-array.c @@ -2491,6 +2491,11 @@ gfc_add_loop_ss_code (gfc_loopinfo * loop, gfc_ss * ss, bool subscript, a reference to the value. */ gfc_conv_expr (&se, expr); } + + /* Ensure that a pointer to the string is stored. */ + if (expr->ts.type == BT_CHARACTER) + gfc_conv_string_parameter (&se); + gfc_add_block_to_block (&outer_loop->pre, &se.pre); gfc_add_block_to_block (&outer_loop->post, &se.post); if (gfc_is_class_scalar_expr (expr)) |