diff options
author | Richard Sandiford <richard@codesourcery.com> | 2005-09-08 16:06:54 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2005-09-08 16:06:54 +0000 |
commit | 068e7338865ad5fea910a27f87c7007d8def8517 (patch) | |
tree | 11a35e0bc52376bedc27a635471ad8c8e20cb028 /gcc/fortran/trans-expr.c | |
parent | dcc9eb26a3b11460bfd1fba9430505f274968b63 (diff) | |
download | gcc-068e7338865ad5fea910a27f87c7007d8def8517.zip gcc-068e7338865ad5fea910a27f87c7007d8def8517.tar.gz gcc-068e7338865ad5fea910a27f87c7007d8def8517.tar.bz2 |
re PR fortran/19928 (Reference of constant derived type component causes failure)
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.
From-SVN: r104035
Diffstat (limited to 'gcc/fortran/trans-expr.c')
-rw-r--r-- | gcc/fortran/trans-expr.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/fortran/trans-expr.c b/gcc/fortran/trans-expr.c index 0d3cb69..b20ed13 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); } |