diff options
Diffstat (limited to 'libgfortran/m4/iforeach.m4')
-rw-r--r-- | libgfortran/m4/iforeach.m4 | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libgfortran/m4/iforeach.m4 b/libgfortran/m4/iforeach.m4 index 2b916af66ddb..e7521e62537b 100644 --- a/libgfortran/m4/iforeach.m4 +++ b/libgfortran/m4/iforeach.m4 @@ -85,7 +85,7 @@ define(FINISH_FOREACH_FUNCTION, frequently used path so probably not worth it. */ base -= sstride[n] * extent[n]; n++; - if (n == rank) + if (n >= rank) { /* Break out of the loop. */ base = NULL; @@ -203,7 +203,7 @@ define(FINISH_MASKED_FOREACH_FUNCTION, base -= sstride[n] * extent[n]; mbase -= mstride[n] * extent[n]; n++; - if (n == rank) + if (n >= rank) { /* Break out of the loop. */ base = NULL; |