trans-array.c (gfc_conv_expr_descriptor): Save some horizontal space.

* trans-array.c (gfc_conv_expr_descriptor): Save some horizontal space.

From-SVN: r180141
This commit is contained in:
Mikael Morin 2011-10-18 14:37:39 +00:00
parent c2558afc97
commit 7c5950bd7f
2 changed files with 9 additions and 3 deletions

View File

@ -1,3 +1,7 @@
2011-10-18 Mikael Morin <mikael@gcc.gnu.org>
* trans-array.c (gfc_conv_expr_descriptor): Save some horizontal space.
2011-10-18 Mikael Morin <mikael@gcc.gnu.org>
* trans-array.c (gfc_conv_expr_descriptor): Move ndim initialization

View File

@ -5978,16 +5978,18 @@ gfc_conv_expr_descriptor (gfc_se * se, gfc_expr * expr, gfc_ss * ss)
if (se->want_coarray)
{
gfc_array_ref *ar = &info->ref->u.ar;
codim = gfc_get_corank (expr);
for (n = ss->data.info.dimen; n < ss->data.info.dimen + codim - 1;
n++)
{
/* Make sure we are not lost somehow. */
gcc_assert (info->ref->u.ar.dimen_type[n] == DIMEN_THIS_IMAGE);
gcc_assert (ar->dimen_type[n] == DIMEN_THIS_IMAGE);
/* Make sure the call to gfc_conv_section_startstride won't
generate unnecessary code to calculate stride. */
gcc_assert (info->ref->u.ar.stride[n] == NULL);
gcc_assert (ar->stride[n] == NULL);
gfc_conv_section_startstride (&loop, ss, n);
loop.from[n] = info->start[n];
@ -5995,7 +5997,7 @@ gfc_conv_expr_descriptor (gfc_se * se, gfc_expr * expr, gfc_ss * ss)
}
gcc_assert (n == ss->data.info.dimen + codim - 1);
evaluate_bound (&loop.pre, info->start, info->ref->u.ar.start,
evaluate_bound (&loop.pre, info->start, ar->start,
info->descriptor, n, true);
loop.from[n] = info->start[n];
}