Message ID | 201111250006.08939.mikael.morin@sfr.fr |
---|---|
State | New |
Headers | show |
Mikael Morin wrote: > This is not a bug nor a regression, so this should normally wait for the next > stage1. It is obvious on the other hand, and safe, as the 'n< loop->dimen' > conditions are inside a 'for (n = 0; n< loop->dimen; n++)' loop. > > Regression tested on x86_64-unknown-linux-gnu (with the just posted pr51250 > patch). OK for trunk? OK. Thanks for the clean up. Tobias
diff --git a/gcc/fortran/trans-array.c b/gcc/fortran/trans-array.c index 2fb2d34..ee8f896 100644 --- a/gcc/fortran/trans-array.c +++ b/gcc/fortran/trans-array.c @@ -4341,9 +4341,9 @@ set_loop_bounds (gfc_loopinfo *loop) } /* Transform everything so we have a simple incrementing variable. */ - if (n < loop->dimen && integer_onep (info->stride[dim])) + if (integer_onep (info->stride[dim])) info->delta[dim] = gfc_index_zero_node; - else if (n < loop->dimen) + else { /* Set the delta for this section. */ info->delta[dim] = gfc_evaluate_now (loop->from[n], &loop->pre);