aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/trans-expr.c
diff options
context:
space:
mode:
authorMikael Morin <mikael.morin@sfr.fr>2011-09-08 17:18:20 +0200
committerMikael Morin <mikael@gcc.gnu.org>2011-09-08 15:18:20 +0000
commita1ae4f435fc547fcae4bf04b6c4efcc310328b3e (patch)
tree3fe0a789a4305072f3743a49b20ff9f34193c138 /gcc/fortran/trans-expr.c
parent66877276157c3ac8210d943054620d509b8ff5c4 (diff)
downloadgcc-a1ae4f435fc547fcae4bf04b6c4efcc310328b3e.zip
gcc-a1ae4f435fc547fcae4bf04b6c4efcc310328b3e.tar.gz
gcc-a1ae4f435fc547fcae4bf04b6c4efcc310328b3e.tar.bz2
trans-array.h (gfc_get_temp_ss): New prototype.
2011-09-08 Mikael Morin <mikael.morin@sfr.fr> * trans-array.h (gfc_get_temp_ss): New prototype. * trans-array.c (gfc_get_temp_ss): New function. (gfc_conv_resolve_dependencies): Re-use gfc_get_temp_ss. (gfc_conv_expr_descriptor): Ditto. * trans-expr.c (gfc_conv_subref_array_arg): Ditto. From-SVN: r178696
Diffstat (limited to 'gcc/fortran/trans-expr.c')
-rw-r--r--gcc/fortran/trans-expr.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/gcc/fortran/trans-expr.c b/gcc/fortran/trans-expr.c
index 04cf4dd..0e85060 100644
--- a/gcc/fortran/trans-expr.c
+++ b/gcc/fortran/trans-expr.c
@@ -2395,18 +2395,12 @@ gfc_conv_subref_array_arg (gfc_se * parmse, gfc_expr * expr, int g77,
|| GFC_DESCRIPTOR_TYPE_P (base_type))
base_type = gfc_get_element_type (base_type);
- loop.temp_ss = gfc_get_ss ();;
- loop.temp_ss->type = GFC_SS_TEMP;
- loop.temp_ss->data.temp.type = base_type;
-
- if (expr->ts.type == BT_CHARACTER)
- loop.temp_ss->string_length = expr->ts.u.cl->backend_decl;
- else
- loop.temp_ss->string_length = NULL;
+ loop.temp_ss = gfc_get_temp_ss (base_type, ((expr->ts.type == BT_CHARACTER)
+ ? expr->ts.u.cl->backend_decl
+ : NULL),
+ loop.dimen);
parmse->string_length = loop.temp_ss->string_length;
- loop.temp_ss->data.temp.dimen = loop.dimen;
- loop.temp_ss->next = gfc_ss_terminator;
/* Associate the SS with the loop. */
gfc_add_ss_to_loop (&loop, loop.temp_ss);