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-expr.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-expr.c')
-rw-r--r-- | gcc/fortran/trans-expr.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/gcc/fortran/trans-expr.c b/gcc/fortran/trans-expr.c index 1e156ff..12da0a0 100644 --- a/gcc/fortran/trans-expr.c +++ b/gcc/fortran/trans-expr.c @@ -6350,7 +6350,13 @@ gfc_conv_expr_reference (gfc_se * se, gfc_expr * expr) /* Returns a reference to the scalar evaluated outside the loop for this case. */ gfc_conv_expr (se, expr); - se->expr = gfc_build_addr_expr (NULL_TREE, se->expr); + + if (expr->ts.type == BT_CHARACTER + && expr->expr_type != EXPR_FUNCTION) + gfc_conv_string_parameter (se); + else + se->expr = gfc_build_addr_expr (NULL_TREE, se->expr); + return; } |