diff options
author | Mikael Morin <mikael@gcc.gnu.org> | 2011-11-03 21:47:49 +0000 |
---|---|---|
committer | Mikael Morin <mikael@gcc.gnu.org> | 2011-11-03 21:47:49 +0000 |
commit | 08dcec6137f763fee843acaca52cd9ac53312eee (patch) | |
tree | e26207440ec82de2588a2ccf50680aa8a31331ae /gcc/fortran/trans-array.c | |
parent | cb4b9eaebedead8367a14345e1c866a43b870ed8 (diff) | |
download | gcc-08dcec6137f763fee843acaca52cd9ac53312eee.zip gcc-08dcec6137f763fee843acaca52cd9ac53312eee.tar.gz gcc-08dcec6137f763fee843acaca52cd9ac53312eee.tar.bz2 |
trans.h (struct gfc_ss, [...]): Move shape field from the former struct to the latter.
* trans.h (struct gfc_ss, struct gfc_array_info): Move shape field
from the former struct to the latter.
* trans-array.c (gfc_conv_ss_startstride, gfc_conv_loop_setup):
Update field references.
* trans-expr.c (gfc_trans_subarray_assign): Update field references
and factor common reference chains.
* trans-io.c (transfer_array_component): Ditto.
From-SVN: r180866
Diffstat (limited to 'gcc/fortran/trans-array.c')
-rw-r--r-- | gcc/fortran/trans-array.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/gcc/fortran/trans-array.c b/gcc/fortran/trans-array.c index 6ff60dc..277a49e 100644 --- a/gcc/fortran/trans-array.c +++ b/gcc/fortran/trans-array.c @@ -3302,8 +3302,12 @@ done: /* Loop over all the SS in the chain. */ for (ss = loop->ss; ss != gfc_ss_terminator; ss = ss->loop_chain) { - if (ss->expr && ss->expr->shape && !ss->shape) - ss->shape = ss->expr->shape; + gfc_array_info *info; + + info = &ss->data.info; + + if (ss->expr && ss->expr->shape && !info->shape) + info->shape = ss->expr->shape; switch (ss->type) { @@ -3891,12 +3895,12 @@ gfc_conv_loop_setup (gfc_loopinfo * loop, locus * where) spec_dim = 0; } - if (ss->shape) + if (info->shape) { - gcc_assert (ss->shape[dim]); + gcc_assert (info->shape[dim]); /* The frontend has worked out the size for us. */ if (!loopspec[n] - || !loopspec[n]->shape + || !specinfo->shape || !integer_zerop (specinfo->start[spec_dim])) /* Prefer zero-based descriptors if possible. */ loopspec[n] = ss; @@ -3973,7 +3977,7 @@ gfc_conv_loop_setup (gfc_loopinfo * loop, locus * where) dim = loopspec[n]->dim[n]; /* Set the extents of this range. */ - cshape = loopspec[n]->shape; + cshape = info->shape; if (cshape && INTEGER_CST_P (info->start[dim]) && INTEGER_CST_P (info->stride[dim])) { |