summaryrefslogtreecommitdiff
path: root/gcc/fortran/trans-expr.c
diff options
context:
space:
mode:
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2005-09-08 16:06:54 +0000
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2005-09-08 16:06:54 +0000
commit598d8efb2d9a6faeea32d2dee4679fb6e4bbd39e (patch)
tree11a35e0bc52376bedc27a635471ad8c8e20cb028 /gcc/fortran/trans-expr.c
parentce1d5a679a06ee770c016befcb6324ed685e121a (diff)
downloadgcc-598d8efb2d9a6faeea32d2dee4679fb6e4bbd39e.tar.gz
PR fortran/19928
* trans-array.c (gfc_conv_array_ref): Call gfc_advance_se_ss_chain after handling scalarized references. Make "indexse" inherit from "se" when handling AR_ELEMENTs. (gfc_walk_variable_expr): Add GFC_SS_SCALAR entries for each substring or scalar reference that follows an array section. * trans-expr.c (gfc_conv_variable): When called from within a scalarization loop, start out with "ref" pointing to the scalarized part of the reference. Don't call gfc_advance_se_ss_chain here. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@104035 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran/trans-expr.c')
-rw-r--r--gcc/fortran/trans-expr.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/fortran/trans-expr.c b/gcc/fortran/trans-expr.c
index 0d3cb69bf9e..b20ed13fc86 100644
--- a/gcc/fortran/trans-expr.c
+++ b/gcc/fortran/trans-expr.c
@@ -305,7 +305,9 @@ gfc_conv_variable (gfc_se * se, gfc_expr * expr)
/* A scalarized term. We already know the descriptor. */
se->expr = se->ss->data.info.descriptor;
se->string_length = se->ss->string_length;
- ref = se->ss->data.info.ref;
+ for (ref = se->ss->data.info.ref; ref; ref = ref->next)
+ if (ref->type == REF_ARRAY && ref->u.ar.type != AR_ELEMENT)
+ break;
}
else
{
@@ -444,8 +446,6 @@ gfc_conv_variable (gfc_se * se, gfc_expr * expr)
else
se->expr = gfc_build_addr_expr (NULL, se->expr);
}
- if (se->ss != NULL)
- gfc_advance_se_ss_chain (se);
}