diff options
Diffstat (limited to 'libgfortran/generated/maxloc0_8_i16.c')
-rw-r--r-- | libgfortran/generated/maxloc0_8_i16.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libgfortran/generated/maxloc0_8_i16.c b/libgfortran/generated/maxloc0_8_i16.c index 273ceb7..35fd1f7 100644 --- a/libgfortran/generated/maxloc0_8_i16.c +++ b/libgfortran/generated/maxloc0_8_i16.c @@ -106,7 +106,7 @@ maxloc0_8_i16 (gfc_array_i8 * const restrict retarray, /* Initialize the return value. */ for (n = 0; n < rank; n++) - dest[n * dstride] = 1; + dest[n * dstride] = 0; { GFC_INTEGER_16 maxval; @@ -118,7 +118,7 @@ maxloc0_8_i16 (gfc_array_i8 * 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_8_i16 (gfc_array_i8 * const restrict retarray, /* Initialize the return value. */ for (n = 0; n < rank; n++) - dest[n * dstride] = 1; + dest[n * dstride] = 0; { GFC_INTEGER_16 maxval; @@ -253,7 +253,7 @@ mmaxloc0_8_i16 (gfc_array_i8 * const restrict retarray, { /* Implementation start. */ - if (*mbase && *base > maxval) + if (*mbase && (*base > maxval || !dest[0])) { maxval = *base; for (n = 0; n < rank; n++) |