diff options
Diffstat (limited to 'libgfortran/generated/maxloc0_4_i8.c')
-rw-r--r-- | libgfortran/generated/maxloc0_4_i8.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libgfortran/generated/maxloc0_4_i8.c b/libgfortran/generated/maxloc0_4_i8.c index 94c4997..9e3d66b 100644 --- a/libgfortran/generated/maxloc0_4_i8.c +++ b/libgfortran/generated/maxloc0_4_i8.c @@ -106,7 +106,7 @@ maxloc0_4_i8 (gfc_array_i4 * const restrict retarray, /* Initialize the return value. */ for (n = 0; n < rank; n++) - dest[n * dstride] = 1; + dest[n * dstride] = 0; { GFC_INTEGER_8 maxval; @@ -118,7 +118,7 @@ maxloc0_4_i8 (gfc_array_i4 * const restrict retarray, { /* Implementation start. */ - if (*base > maxval) + if (*base > maxval || !dest[0]) { maxval = *base; for (n = 0; n < rank; n++) @@ -241,7 +241,7 @@ mmaxloc0_4_i8 (gfc_array_i4 * const restrict retarray, /* Initialize the return value. */ for (n = 0; n < rank; n++) - dest[n * dstride] = 1; + dest[n * dstride] = 0; { GFC_INTEGER_8 maxval; @@ -253,7 +253,7 @@ mmaxloc0_4_i8 (gfc_array_i4 * const restrict retarray, { /* Implementation start. */ - if (*mbase && *base > maxval) + if (*mbase && (*base > maxval || !dest[0])) { maxval = *base; for (n = 0; n < rank; n++) |