aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/trans-expr.c
diff options
context:
space:
mode:
authorMikael Morin <mikael@gcc.gnu.org>2011-11-03 22:04:50 +0000
committerMikael Morin <mikael@gcc.gnu.org>2011-11-03 22:04:50 +0000
commita0add3be3e216ad8e7cbf02c684b70c13928500b (patch)
tree377c8552e9248eaa6500645e7b95fabb3ae3f542 /gcc/fortran/trans-expr.c
parentf98cfd3c42d1aca224bfe463f5852d1ae1e5bd2e (diff)
downloadgcc-a0add3be3e216ad8e7cbf02c684b70c13928500b.zip
gcc-a0add3be3e216ad8e7cbf02c684b70c13928500b.tar.gz
gcc-a0add3be3e216ad8e7cbf02c684b70c13928500b.tar.bz2
trans.h (struct gfc_ss, [...]): Move field string_length from the former struct to the latter.
* trans.h (struct gfc_ss, struct gfc_ss_info): Move field string_length from the former struct to the latter. * trans-array.c (gfc_get_temp_ss, gfc_trans_array_constructor, gfc_add_loop_ss_code, gfc_conv_ss_descriptor, gfc_conv_scalarized_array_ref, gfc_conv_resolve_dependencies, gfc_conv_loop_setup, gfc_conv_expr_descriptor): Update references to string_length and factor common reference chains where possible. * trans-const.c (gfc_conv_constant): Ditto. * trans-expr.c (gfc_conv_variable, gfc_conv_subref_array_arg, gfc_conv_expr): Ditto. From-SVN: r180869
Diffstat (limited to 'gcc/fortran/trans-expr.c')
-rw-r--r--gcc/fortran/trans-expr.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/gcc/fortran/trans-expr.c b/gcc/fortran/trans-expr.c
index 2e620ad..87734f1 100644
--- a/gcc/fortran/trans-expr.c
+++ b/gcc/fortran/trans-expr.c
@@ -626,13 +626,15 @@ gfc_conv_variable (gfc_se * se, gfc_expr * expr)
ss = se->ss;
if (ss != NULL)
{
+ gfc_ss_info *ss_info = ss->info;
+
/* Check that something hasn't gone horribly wrong. */
gcc_assert (ss != gfc_ss_terminator);
- gcc_assert (ss->info->expr == expr);
+ gcc_assert (ss_info->expr == expr);
/* A scalarized term. We already know the descriptor. */
se->expr = se->ss->data.info.descriptor;
- se->string_length = se->ss->string_length;
+ se->string_length = ss_info->string_length;
for (ref = se->ss->data.info.ref; ref; ref = ref->next)
if (ref->type == REF_ARRAY && ref->u.ar.type != AR_ELEMENT)
break;
@@ -2402,7 +2404,7 @@ gfc_conv_subref_array_arg (gfc_se * parmse, gfc_expr * expr, int g77,
: NULL),
loop.dimen);
- parmse->string_length = loop.temp_ss->string_length;
+ parmse->string_length = loop.temp_ss->info->string_length;
/* Associate the SS with the loop. */
gfc_add_ss_to_loop (&loop, loop.temp_ss);
@@ -4833,12 +4835,15 @@ gfc_conv_expr (gfc_se * se, gfc_expr * expr)
&& (ss->info->type == GFC_SS_SCALAR
|| ss->info->type == GFC_SS_REFERENCE))
{
+ gfc_ss_info *ss_info;
+
+ ss_info = ss->info;
/* Substitute a scalar expression evaluated outside the scalarization
loop. */
se->expr = se->ss->data.scalar.expr;
- if (ss->info->type == GFC_SS_REFERENCE)
+ if (ss_info->type == GFC_SS_REFERENCE)
se->expr = gfc_build_addr_expr (NULL_TREE, se->expr);
- se->string_length = se->ss->string_length;
+ se->string_length = ss_info->string_length;
gfc_advance_se_ss_chain (se);
return;
}