diff options
Diffstat (limited to 'libgfortran/m4/ifunction.m4')
-rw-r--r-- | libgfortran/m4/ifunction.m4 | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libgfortran/m4/ifunction.m4 b/libgfortran/m4/ifunction.m4 index b377677a5eb..82a74ef80b4 100644 --- a/libgfortran/m4/ifunction.m4 +++ b/libgfortran/m4/ifunction.m4 @@ -40,6 +40,9 @@ name`'rtype_qual`_'atype_code (rtype *retarray, atype *array, index_type *pdim) /* Make dim zero based to avoid confusion. */ dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; + + /* TODO: It should be a front end job to correctly set the strides. */ + if (array->dim[0].stride == 0) array->dim[0].stride = 1; @@ -174,9 +177,15 @@ void dim = (*pdim) - 1; rank = GFC_DESCRIPTOR_RANK (array) - 1; + + /* TODO: It should be a front end job to correctly set the strides. */ + if (array->dim[0].stride == 0) array->dim[0].stride = 1; + if (mask->dim[0].stride == 0) + mask->dim[0].stride = 1; + len = array->dim[dim].ubound + 1 - array->dim[dim].lbound; if (len <= 0) return; |