diff options
Diffstat (limited to 'libgfortran/generated/minloc1_4_i4.c')
-rw-r--r-- | libgfortran/generated/minloc1_4_i4.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libgfortran/generated/minloc1_4_i4.c b/libgfortran/generated/minloc1_4_i4.c index c9f5194bc3b..a80d2c68d07 100644 --- a/libgfortran/generated/minloc1_4_i4.c +++ b/libgfortran/generated/minloc1_4_i4.c @@ -132,7 +132,7 @@ minloc1_4_i4 (gfc_array_i4 * const restrict retarray, GFC_INTEGER_4 minval; minval = GFC_INTEGER_4_HUGE; - result = 1; + result = 0; if (len <= 0) *dest = 0; else @@ -140,7 +140,7 @@ minloc1_4_i4 (gfc_array_i4 * const restrict retarray, for (n = 0; n < len; n++, src += delta) { - if (*src < minval) + if (*src < minval || !result) { minval = *src; result = (GFC_INTEGER_4)n + 1; @@ -299,7 +299,7 @@ mminloc1_4_i4 (gfc_array_i4 * const restrict retarray, GFC_INTEGER_4 minval; minval = GFC_INTEGER_4_HUGE; - result = 1; + result = 0; if (len <= 0) *dest = 0; else @@ -307,7 +307,7 @@ mminloc1_4_i4 (gfc_array_i4 * const restrict retarray, for (n = 0; n < len; n++, src += delta, msrc += mdelta) { - if (*msrc && *src < minval) + if (*msrc && (*src < minval || !result)) { minval = *src; result = (GFC_INTEGER_4)n + 1; |