diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index a33dbe02350..6dc36b358cb 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,7 @@ +2011-10-18 Mikael Morin + + * trans-array.c (gfc_conv_expr_descriptor): Save some horizontal space. + 2011-10-18 Mikael Morin * trans-array.c (gfc_conv_expr_descriptor): Move ndim initialization diff --git a/gcc/fortran/trans-array.c b/gcc/fortran/trans-array.c index 2c3459034bc..0034b49ffa8 100644 --- a/gcc/fortran/trans-array.c +++ b/gcc/fortran/trans-array.c @@ -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]; }