diff options
Diffstat (limited to 'libgfortran/generated')
84 files changed, 336 insertions, 336 deletions
diff --git a/libgfortran/generated/maxloc0_16_i16.c b/libgfortran/generated/maxloc0_16_i16.c index f61fe0b..93ad9e4 100644 --- a/libgfortran/generated/maxloc0_16_i16.c +++ b/libgfortran/generated/maxloc0_16_i16.c @@ -106,7 +106,7 @@ maxloc0_16_i16 (gfc_array_i16 * 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_16_i16 (gfc_array_i16 * 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_16_i16 (gfc_array_i16 * 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_16_i16 (gfc_array_i16 * const restrict retarray, { /* Implementation start. */ - if (*mbase && *base > maxval) + if (*mbase && (*base > maxval || !dest[0])) { maxval = *base; for (n = 0; n < rank; n++) diff --git a/libgfortran/generated/maxloc0_16_i4.c b/libgfortran/generated/maxloc0_16_i4.c index da64cdd..6808f69 100644 --- a/libgfortran/generated/maxloc0_16_i4.c +++ b/libgfortran/generated/maxloc0_16_i4.c @@ -106,7 +106,7 @@ maxloc0_16_i4 (gfc_array_i16 * const restrict retarray, /* Initialize the return value. */ for (n = 0; n < rank; n++) - dest[n * dstride] = 1; + dest[n * dstride] = 0; { GFC_INTEGER_4 maxval; @@ -118,7 +118,7 @@ maxloc0_16_i4 (gfc_array_i16 * 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_16_i4 (gfc_array_i16 * const restrict retarray, /* Initialize the return value. */ for (n = 0; n < rank; n++) - dest[n * dstride] = 1; + dest[n * dstride] = 0; { GFC_INTEGER_4 maxval; @@ -253,7 +253,7 @@ mmaxloc0_16_i4 (gfc_array_i16 * const restrict retarray, { /* Implementation start. */ - if (*mbase && *base > maxval) + if (*mbase && (*base > maxval || !dest[0])) { maxval = *base; for (n = 0; n < rank; n++) diff --git a/libgfortran/generated/maxloc0_16_i8.c b/libgfortran/generated/maxloc0_16_i8.c index 07cb378..ed3061a 100644 --- a/libgfortran/generated/maxloc0_16_i8.c +++ b/libgfortran/generated/maxloc0_16_i8.c @@ -106,7 +106,7 @@ maxloc0_16_i8 (gfc_array_i16 * 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_16_i8 (gfc_array_i16 * 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_16_i8 (gfc_array_i16 * 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_16_i8 (gfc_array_i16 * const restrict retarray, { /* Implementation start. */ - if (*mbase && *base > maxval) + if (*mbase && (*base > maxval || !dest[0])) { maxval = *base; for (n = 0; n < rank; n++) diff --git a/libgfortran/generated/maxloc0_16_r10.c b/libgfortran/generated/maxloc0_16_r10.c index e8ff7c4..e427ba5 100644 --- a/libgfortran/generated/maxloc0_16_r10.c +++ b/libgfortran/generated/maxloc0_16_r10.c @@ -106,7 +106,7 @@ maxloc0_16_r10 (gfc_array_i16 * const restrict retarray, /* Initialize the return value. */ for (n = 0; n < rank; n++) - dest[n * dstride] = 1; + dest[n * dstride] = 0; { GFC_REAL_10 maxval; @@ -118,7 +118,7 @@ maxloc0_16_r10 (gfc_array_i16 * 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_16_r10 (gfc_array_i16 * const restrict retarray, /* Initialize the return value. */ for (n = 0; n < rank; n++) - dest[n * dstride] = 1; + dest[n * dstride] = 0; { GFC_REAL_10 maxval; @@ -253,7 +253,7 @@ mmaxloc0_16_r10 (gfc_array_i16 * const restrict retarray, { /* Implementation start. */ - if (*mbase && *base > maxval) + if (*mbase && (*base > maxval || !dest[0])) { maxval = *base; for (n = 0; n < rank; n++) diff --git a/libgfortran/generated/maxloc0_16_r16.c b/libgfortran/generated/maxloc0_16_r16.c index da6a3e9..b457997 100644 --- a/libgfortran/generated/maxloc0_16_r16.c +++ b/libgfortran/generated/maxloc0_16_r16.c @@ -106,7 +106,7 @@ maxloc0_16_r16 (gfc_array_i16 * const restrict retarray, /* Initialize the return value. */ for (n = 0; n < rank; n++) - dest[n * dstride] = 1; + dest[n * dstride] = 0; { GFC_REAL_16 maxval; @@ -118,7 +118,7 @@ maxloc0_16_r16 (gfc_array_i16 * 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_16_r16 (gfc_array_i16 * const restrict retarray, /* Initialize the return value. */ for (n = 0; n < rank; n++) - dest[n * dstride] = 1; + dest[n * dstride] = 0; { GFC_REAL_16 maxval; @@ -253,7 +253,7 @@ mmaxloc0_16_r16 (gfc_array_i16 * const restrict retarray, { /* Implementation start. */ - if (*mbase && *base > maxval) + if (*mbase && (*base > maxval || !dest[0])) { maxval = *base; for (n = 0; n < rank; n++) diff --git a/libgfortran/generated/maxloc0_16_r4.c b/libgfortran/generated/maxloc0_16_r4.c index 6797bd9..e9dbcbf 100644 --- a/libgfortran/generated/maxloc0_16_r4.c +++ b/libgfortran/generated/maxloc0_16_r4.c @@ -106,7 +106,7 @@ maxloc0_16_r4 (gfc_array_i16 * const restrict retarray, /* Initialize the return value. */ for (n = 0; n < rank; n++) - dest[n * dstride] = 1; + dest[n * dstride] = 0; { GFC_REAL_4 maxval; @@ -118,7 +118,7 @@ maxloc0_16_r4 (gfc_array_i16 * 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_16_r4 (gfc_array_i16 * const restrict retarray, /* Initialize the return value. */ for (n = 0; n < rank; n++) - dest[n * dstride] = 1; + dest[n * dstride] = 0; { GFC_REAL_4 maxval; @@ -253,7 +253,7 @@ mmaxloc0_16_r4 (gfc_array_i16 * const restrict retarray, { /* Implementation start. */ - if (*mbase && *base > maxval) + if (*mbase && (*base > maxval || !dest[0])) { maxval = *base; for (n = 0; n < rank; n++) diff --git a/libgfortran/generated/maxloc0_16_r8.c b/libgfortran/generated/maxloc0_16_r8.c index f03019b..07d7aef 100644 --- a/libgfortran/generated/maxloc0_16_r8.c +++ b/libgfortran/generated/maxloc0_16_r8.c @@ -106,7 +106,7 @@ maxloc0_16_r8 (gfc_array_i16 * const restrict retarray, /* Initialize the return value. */ for (n = 0; n < rank; n++) - dest[n * dstride] = 1; + dest[n * dstride] = 0; { GFC_REAL_8 maxval; @@ -118,7 +118,7 @@ maxloc0_16_r8 (gfc_array_i16 * 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_16_r8 (gfc_array_i16 * const restrict retarray, /* Initialize the return value. */ for (n = 0; n < rank; n++) - dest[n * dstride] = 1; + dest[n * dstride] = 0; { GFC_REAL_8 maxval; @@ -253,7 +253,7 @@ mmaxloc0_16_r8 (gfc_array_i16 * const restrict retarray, { /* Implementation start. */ - if (*mbase && *base > maxval) + if (*mbase && (*base > maxval || !dest[0])) { maxval = *base; for (n = 0; n < rank; n++) diff --git a/libgfortran/generated/maxloc0_4_i16.c b/libgfortran/generated/maxloc0_4_i16.c index aa1c0c0..08f3180 100644 --- a/libgfortran/generated/maxloc0_4_i16.c +++ b/libgfortran/generated/maxloc0_4_i16.c @@ -106,7 +106,7 @@ maxloc0_4_i16 (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_16 maxval; @@ -118,7 +118,7 @@ maxloc0_4_i16 (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_i16 (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_16 maxval; @@ -253,7 +253,7 @@ mmaxloc0_4_i16 (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++) diff --git a/libgfortran/generated/maxloc0_4_i4.c b/libgfortran/generated/maxloc0_4_i4.c index e95e040..9c342d9 100644 --- a/libgfortran/generated/maxloc0_4_i4.c +++ b/libgfortran/generated/maxloc0_4_i4.c @@ -106,7 +106,7 @@ maxloc0_4_i4 (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_4 maxval; @@ -118,7 +118,7 @@ maxloc0_4_i4 (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_i4 (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_4 maxval; @@ -253,7 +253,7 @@ mmaxloc0_4_i4 (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++) 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++) diff --git a/libgfortran/generated/maxloc0_4_r10.c b/libgfortran/generated/maxloc0_4_r10.c index 4e9dead..c44fedd 100644 --- a/libgfortran/generated/maxloc0_4_r10.c +++ b/libgfortran/generated/maxloc0_4_r10.c @@ -106,7 +106,7 @@ maxloc0_4_r10 (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_REAL_10 maxval; @@ -118,7 +118,7 @@ maxloc0_4_r10 (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_r10 (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_REAL_10 maxval; @@ -253,7 +253,7 @@ mmaxloc0_4_r10 (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++) diff --git a/libgfortran/generated/maxloc0_4_r16.c b/libgfortran/generated/maxloc0_4_r16.c index 6059c87..e5ff44f 100644 --- a/libgfortran/generated/maxloc0_4_r16.c +++ b/libgfortran/generated/maxloc0_4_r16.c @@ -106,7 +106,7 @@ maxloc0_4_r16 (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_REAL_16 maxval; @@ -118,7 +118,7 @@ maxloc0_4_r16 (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_r16 (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_REAL_16 maxval; @@ -253,7 +253,7 @@ mmaxloc0_4_r16 (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++) diff --git a/libgfortran/generated/maxloc0_4_r4.c b/libgfortran/generated/maxloc0_4_r4.c index 260c3d3..f5dba47 100644 --- a/libgfortran/generated/maxloc0_4_r4.c +++ b/libgfortran/generated/maxloc0_4_r4.c @@ -106,7 +106,7 @@ maxloc0_4_r4 (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_REAL_4 maxval; @@ -118,7 +118,7 @@ maxloc0_4_r4 (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_r4 (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_REAL_4 maxval; @@ -253,7 +253,7 @@ mmaxloc0_4_r4 (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++) diff --git a/libgfortran/generated/maxloc0_4_r8.c b/libgfortran/generated/maxloc0_4_r8.c index 001b6bf..a82ceda 100644 --- a/libgfortran/generated/maxloc0_4_r8.c +++ b/libgfortran/generated/maxloc0_4_r8.c @@ -106,7 +106,7 @@ maxloc0_4_r8 (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_REAL_8 maxval; @@ -118,7 +118,7 @@ maxloc0_4_r8 (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_r8 (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_REAL_8 maxval; @@ -253,7 +253,7 @@ mmaxloc0_4_r8 (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++) 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++) diff --git a/libgfortran/generated/maxloc0_8_i4.c b/libgfortran/generated/maxloc0_8_i4.c index 4860ccc..16320bd 100644 --- a/libgfortran/generated/maxloc0_8_i4.c +++ b/libgfortran/generated/maxloc0_8_i4.c @@ -106,7 +106,7 @@ maxloc0_8_i4 (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_4 maxval; @@ -118,7 +118,7 @@ maxloc0_8_i4 (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_i4 (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_4 maxval; @@ -253,7 +253,7 @@ mmaxloc0_8_i4 (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++) diff --git a/libgfortran/generated/maxloc0_8_i8.c b/libgfortran/generated/maxloc0_8_i8.c index 786bf70..99ab4b9 100644 --- a/libgfortran/generated/maxloc0_8_i8.c +++ b/libgfortran/generated/maxloc0_8_i8.c @@ -106,7 +106,7 @@ maxloc0_8_i8 (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_8 maxval; @@ -118,7 +118,7 @@ maxloc0_8_i8 (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_i8 (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_8 maxval; @@ -253,7 +253,7 @@ mmaxloc0_8_i8 (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++) diff --git a/libgfortran/generated/maxloc0_8_r10.c b/libgfortran/generated/maxloc0_8_r10.c index 566757f..eaaff9f 100644 --- a/libgfortran/generated/maxloc0_8_r10.c +++ b/libgfortran/generated/maxloc0_8_r10.c @@ -106,7 +106,7 @@ maxloc0_8_r10 (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_REAL_10 maxval; @@ -118,7 +118,7 @@ maxloc0_8_r10 (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_r10 (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_REAL_10 maxval; @@ -253,7 +253,7 @@ mmaxloc0_8_r10 (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++) diff --git a/libgfortran/generated/maxloc0_8_r16.c b/libgfortran/generated/maxloc0_8_r16.c index d5232a4..e0d1a42 100644 --- a/libgfortran/generated/maxloc0_8_r16.c +++ b/libgfortran/generated/maxloc0_8_r16.c @@ -106,7 +106,7 @@ maxloc0_8_r16 (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_REAL_16 maxval; @@ -118,7 +118,7 @@ maxloc0_8_r16 (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_r16 (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_REAL_16 maxval; @@ -253,7 +253,7 @@ mmaxloc0_8_r16 (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++) diff --git a/libgfortran/generated/maxloc0_8_r4.c b/libgfortran/generated/maxloc0_8_r4.c index 1effd3a..54047b5 100644 --- a/libgfortran/generated/maxloc0_8_r4.c +++ b/libgfortran/generated/maxloc0_8_r4.c @@ -106,7 +106,7 @@ maxloc0_8_r4 (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_REAL_4 maxval; @@ -118,7 +118,7 @@ maxloc0_8_r4 (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_r4 (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_REAL_4 maxval; @@ -253,7 +253,7 @@ mmaxloc0_8_r4 (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++) diff --git a/libgfortran/generated/maxloc0_8_r8.c b/libgfortran/generated/maxloc0_8_r8.c index 18b7687..820d3a7 100644 --- a/libgfortran/generated/maxloc0_8_r8.c +++ b/libgfortran/generated/maxloc0_8_r8.c @@ -106,7 +106,7 @@ maxloc0_8_r8 (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_REAL_8 maxval; @@ -118,7 +118,7 @@ maxloc0_8_r8 (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_r8 (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_REAL_8 maxval; @@ -253,7 +253,7 @@ mmaxloc0_8_r8 (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++) diff --git a/libgfortran/generated/maxloc1_16_i16.c b/libgfortran/generated/maxloc1_16_i16.c index 430e6ee..9595ac3 100644 --- a/libgfortran/generated/maxloc1_16_i16.c +++ b/libgfortran/generated/maxloc1_16_i16.c @@ -132,7 +132,7 @@ maxloc1_16_i16 (gfc_array_i16 * const restrict retarray, GFC_INTEGER_16 maxval; maxval = -GFC_INTEGER_16_HUGE; - result = 1; + result = 0; if (len <= 0) *dest = 0; else @@ -140,7 +140,7 @@ maxloc1_16_i16 (gfc_array_i16 * const restrict retarray, for (n = 0; n < len; n++, src += delta) { - if (*src > maxval) + if (*src > maxval || !result) { maxval = *src; result = (GFC_INTEGER_16)n + 1; @@ -299,7 +299,7 @@ mmaxloc1_16_i16 (gfc_array_i16 * const restrict retarray, GFC_INTEGER_16 maxval; maxval = -GFC_INTEGER_16_HUGE; - result = 1; + result = 0; if (len <= 0) *dest = 0; else @@ -307,7 +307,7 @@ mmaxloc1_16_i16 (gfc_array_i16 * const restrict retarray, for (n = 0; n < len; n++, src += delta, msrc += mdelta) { - if (*msrc && *src > maxval) + if (*msrc && (*src > maxval || !result)) { maxval = *src; result = (GFC_INTEGER_16)n + 1; diff --git a/libgfortran/generated/maxloc1_16_i4.c b/libgfortran/generated/maxloc1_16_i4.c index 458b72e..cd668bb 100644 --- a/libgfortran/generated/maxloc1_16_i4.c +++ b/libgfortran/generated/maxloc1_16_i4.c @@ -132,7 +132,7 @@ maxloc1_16_i4 (gfc_array_i16 * const restrict retarray, GFC_INTEGER_4 maxval; maxval = -GFC_INTEGER_4_HUGE; - result = 1; + result = 0; if (len <= 0) *dest = 0; else @@ -140,7 +140,7 @@ maxloc1_16_i4 (gfc_array_i16 * const restrict retarray, for (n = 0; n < len; n++, src += delta) { - if (*src > maxval) + if (*src > maxval || !result) { maxval = *src; result = (GFC_INTEGER_16)n + 1; @@ -299,7 +299,7 @@ mmaxloc1_16_i4 (gfc_array_i16 * const restrict retarray, GFC_INTEGER_4 maxval; maxval = -GFC_INTEGER_4_HUGE; - result = 1; + result = 0; if (len <= 0) *dest = 0; else @@ -307,7 +307,7 @@ mmaxloc1_16_i4 (gfc_array_i16 * const restrict retarray, for (n = 0; n < len; n++, src += delta, msrc += mdelta) { - if (*msrc && *src > maxval) + if (*msrc && (*src > maxval || !result)) { maxval = *src; result = (GFC_INTEGER_16)n + 1; diff --git a/libgfortran/generated/maxloc1_16_i8.c b/libgfortran/generated/maxloc1_16_i8.c index cda852e..ab66598 100644 --- a/libgfortran/generated/maxloc1_16_i8.c +++ b/libgfortran/generated/maxloc1_16_i8.c @@ -132,7 +132,7 @@ maxloc1_16_i8 (gfc_array_i16 * const restrict retarray, GFC_INTEGER_8 maxval; maxval = -GFC_INTEGER_8_HUGE; - result = 1; + result = 0; if (len <= 0) *dest = 0; else @@ -140,7 +140,7 @@ maxloc1_16_i8 (gfc_array_i16 * const restrict retarray, for (n = 0; n < len; n++, src += delta) { - if (*src > maxval) + if (*src > maxval || !result) { maxval = *src; result = (GFC_INTEGER_16)n + 1; @@ -299,7 +299,7 @@ mmaxloc1_16_i8 (gfc_array_i16 * const restrict retarray, GFC_INTEGER_8 maxval; maxval = -GFC_INTEGER_8_HUGE; - result = 1; + result = 0; if (len <= 0) *dest = 0; else @@ -307,7 +307,7 @@ mmaxloc1_16_i8 (gfc_array_i16 * const restrict retarray, for (n = 0; n < len; n++, src += delta, msrc += mdelta) { - if (*msrc && *src > maxval) + if (*msrc && (*src > maxval || !result)) { maxval = *src; result = (GFC_INTEGER_16)n + 1; diff --git a/libgfortran/generated/maxloc1_16_r10.c b/libgfortran/generated/maxloc1_16_r10.c index e368bd9..90606dd 100644 --- a/libgfortran/generated/maxloc1_16_r10.c +++ b/libgfortran/generated/maxloc1_16_r10.c @@ -132,7 +132,7 @@ maxloc1_16_r10 (gfc_array_i16 * const restrict retarray, GFC_REAL_10 maxval; maxval = -GFC_REAL_10_HUGE; - result = 1; + result = 0; if (len <= 0) *dest = 0; else @@ -140,7 +140,7 @@ maxloc1_16_r10 (gfc_array_i16 * const restrict retarray, for (n = 0; n < len; n++, src += delta) { - if (*src > maxval) + if (*src > maxval || !result) { maxval = *src; result = (GFC_INTEGER_16)n + 1; @@ -299,7 +299,7 @@ mmaxloc1_16_r10 (gfc_array_i16 * const restrict retarray, GFC_REAL_10 maxval; maxval = -GFC_REAL_10_HUGE; - result = 1; + result = 0; if (len <= 0) *dest = 0; else @@ -307,7 +307,7 @@ mmaxloc1_16_r10 (gfc_array_i16 * const restrict retarray, for (n = 0; n < len; n++, src += delta, msrc += mdelta) { - if (*msrc && *src > maxval) + if (*msrc && (*src > maxval || !result)) { maxval = *src; result = (GFC_INTEGER_16)n + 1; diff --git a/libgfortran/generated/maxloc1_16_r16.c b/libgfortran/generated/maxloc1_16_r16.c index 2d2ec0c..0a1939c 100644 --- a/libgfortran/generated/maxloc1_16_r16.c +++ b/libgfortran/generated/maxloc1_16_r16.c @@ -132,7 +132,7 @@ maxloc1_16_r16 (gfc_array_i16 * const restrict retarray, GFC_REAL_16 maxval; maxval = -GFC_REAL_16_HUGE; - result = 1; + result = 0; if (len <= 0) *dest = 0; else @@ -140,7 +140,7 @@ maxloc1_16_r16 (gfc_array_i16 * const restrict retarray, for (n = 0; n < len; n++, src += delta) { - if (*src > maxval) + if (*src > maxval || !result) { maxval = *src; result = (GFC_INTEGER_16)n + 1; @@ -299,7 +299,7 @@ mmaxloc1_16_r16 (gfc_array_i16 * const restrict retarray, GFC_REAL_16 maxval; maxval = -GFC_REAL_16_HUGE; - result = 1; + result = 0; if (len <= 0) *dest = 0; else @@ -307,7 +307,7 @@ mmaxloc1_16_r16 (gfc_array_i16 * const restrict retarray, for (n = 0; n < len; n++, src += delta, msrc += mdelta) { - if (*msrc && *src > maxval) + if (*msrc && (*src > maxval || !result)) { maxval = *src; result = (GFC_INTEGER_16)n + 1; diff --git a/libgfortran/generated/maxloc1_16_r4.c b/libgfortran/generated/maxloc1_16_r4.c index c5dfba1..445e8b0 100644 --- a/libgfortran/generated/maxloc1_16_r4.c +++ b/libgfortran/generated/maxloc1_16_r4.c @@ -132,7 +132,7 @@ maxloc1_16_r4 (gfc_array_i16 * const restrict retarray, GFC_REAL_4 maxval; maxval = -GFC_REAL_4_HUGE; - result = 1; + result = 0; if (len <= 0) *dest = 0; else @@ -140,7 +140,7 @@ maxloc1_16_r4 (gfc_array_i16 * const restrict retarray, for (n = 0; n < len; n++, src += delta) { - if (*src > maxval) + if (*src > maxval || !result) { maxval = *src; result = (GFC_INTEGER_16)n + 1; @@ -299,7 +299,7 @@ mmaxloc1_16_r4 (gfc_array_i16 * const restrict retarray, GFC_REAL_4 maxval; maxval = -GFC_REAL_4_HUGE; - result = 1; + result = 0; if (len <= 0) *dest = 0; else @@ -307,7 +307,7 @@ mmaxloc1_16_r4 (gfc_array_i16 * const restrict retarray, for (n = 0; n < len; n++, src += delta, msrc += mdelta) { - if (*msrc && *src > maxval) + if (*msrc && (*src > maxval || !result)) { maxval = *src; result = (GFC_INTEGER_16)n + 1; diff --git a/libgfortran/generated/maxloc1_16_r8.c b/libgfortran/generated/maxloc1_16_r8.c index 5e965b2..3a663bb 100644 --- a/libgfortran/generated/maxloc1_16_r8.c +++ b/libgfortran/generated/maxloc1_16_r8.c @@ -132,7 +132,7 @@ maxloc1_16_r8 (gfc_array_i16 * const restrict retarray, GFC_REAL_8 maxval; maxval = -GFC_REAL_8_HUGE; - result = 1; + result = 0; if (len <= 0) *dest = 0; else @@ -140,7 +140,7 @@ maxloc1_16_r8 (gfc_array_i16 * const restrict retarray, for (n = 0; n < len; n++, src += delta) { - if (*src > maxval) + if (*src > maxval || !result) { maxval = *src; result = (GFC_INTEGER_16)n + 1; @@ -299,7 +299,7 @@ mmaxloc1_16_r8 (gfc_array_i16 * const restrict retarray, GFC_REAL_8 maxval; maxval = -GFC_REAL_8_HUGE; - result = 1; + result = 0; if (len <= 0) *dest = 0; else @@ -307,7 +307,7 @@ mmaxloc1_16_r8 (gfc_array_i16 * const restrict retarray, for (n = 0; n < len; n++, src += delta, msrc += mdelta) { - if (*msrc && *src > maxval) + if (*msrc && (*src > maxval || !result)) { maxval = *src; result = (GFC_INTEGER_16)n + 1; diff --git a/libgfortran/generated/maxloc1_4_i16.c b/libgfortran/generated/maxloc1_4_i16.c index c801e0e..b881504 100644 --- a/libgfortran/generated/maxloc1_4_i16.c +++ b/libgfortran/generated/maxloc1_4_i16.c @@ -132,7 +132,7 @@ maxloc1_4_i16 (gfc_array_i4 * const restrict retarray, GFC_INTEGER_16 maxval; maxval = -GFC_INTEGER_16_HUGE; - result = 1; + result = 0; if (len <= 0) *dest = 0; else @@ -140,7 +140,7 @@ maxloc1_4_i16 (gfc_array_i4 * const restrict retarray, for (n = 0; n < len; n++, src += delta) { - if (*src > maxval) + if (*src > maxval || !result) { maxval = *src; result = (GFC_INTEGER_4)n + 1; @@ -299,7 +299,7 @@ mmaxloc1_4_i16 (gfc_array_i4 * const restrict retarray, GFC_INTEGER_16 maxval; maxval = -GFC_INTEGER_16_HUGE; - result = 1; + result = 0; if (len <= 0) *dest = 0; else @@ -307,7 +307,7 @@ mmaxloc1_4_i16 (gfc_array_i4 * const restrict retarray, for (n = 0; n < len; n++, src += delta, msrc += mdelta) { - if (*msrc && *src > maxval) + if (*msrc && (*src > maxval || !result)) { maxval = *src; result = (GFC_INTEGER_4)n + 1; diff --git a/libgfortran/generated/maxloc1_4_i4.c b/libgfortran/generated/maxloc1_4_i4.c index cd6f93a..e8a053e 100644 --- a/libgfortran/generated/maxloc1_4_i4.c +++ b/libgfortran/generated/maxloc1_4_i4.c @@ -132,7 +132,7 @@ maxloc1_4_i4 (gfc_array_i4 * const restrict retarray, GFC_INTEGER_4 maxval; maxval = -GFC_INTEGER_4_HUGE; - result = 1; + result = 0; if (len <= 0) *dest = 0; else @@ -140,7 +140,7 @@ maxloc1_4_i4 (gfc_array_i4 * const restrict retarray, for (n = 0; n < len; n++, src += delta) { - if (*src > maxval) + if (*src > maxval || !result) { maxval = *src; result = (GFC_INTEGER_4)n + 1; @@ -299,7 +299,7 @@ mmaxloc1_4_i4 (gfc_array_i4 * const restrict retarray, GFC_INTEGER_4 maxval; maxval = -GFC_INTEGER_4_HUGE; - result = 1; + result = 0; if (len <= 0) *dest = 0; else @@ -307,7 +307,7 @@ mmaxloc1_4_i4 (gfc_array_i4 * const restrict retarray, for (n = 0; n < len; n++, src += delta, msrc += mdelta) { - if (*msrc && *src > maxval) + if (*msrc && (*src > maxval || !result)) { maxval = *src; result = (GFC_INTEGER_4)n + 1; diff --git a/libgfortran/generated/maxloc1_4_i8.c b/libgfortran/generated/maxloc1_4_i8.c index 6d0353b..ff5b7b9 100644 --- a/libgfortran/generated/maxloc1_4_i8.c +++ b/libgfortran/generated/maxloc1_4_i8.c @@ -132,7 +132,7 @@ maxloc1_4_i8 (gfc_array_i4 * const restrict retarray, GFC_INTEGER_8 maxval; maxval = -GFC_INTEGER_8_HUGE; - result = 1; + result = 0; if (len <= 0) *dest = 0; else @@ -140,7 +140,7 @@ maxloc1_4_i8 (gfc_array_i4 * const restrict retarray, for (n = 0; n < len; n++, src += delta) { - if (*src > maxval) + if (*src > maxval || !result) { maxval = *src; result = (GFC_INTEGER_4)n + 1; @@ -299,7 +299,7 @@ mmaxloc1_4_i8 (gfc_array_i4 * const restrict retarray, GFC_INTEGER_8 maxval; maxval = -GFC_INTEGER_8_HUGE; - result = 1; + result = 0; if (len <= 0) *dest = 0; else @@ -307,7 +307,7 @@ mmaxloc1_4_i8 (gfc_array_i4 * const restrict retarray, for (n = 0; n < len; n++, src += delta, msrc += mdelta) { - if (*msrc && *src > maxval) + if (*msrc && (*src > maxval || !result)) { maxval = *src; result = (GFC_INTEGER_4)n + 1; diff --git a/libgfortran/generated/maxloc1_4_r10.c b/libgfortran/generated/maxloc1_4_r10.c index e8364e2..306cfe9 100644 --- a/libgfortran/generated/maxloc1_4_r10.c +++ b/libgfortran/generated/maxloc1_4_r10.c @@ -132,7 +132,7 @@ maxloc1_4_r10 (gfc_array_i4 * const restrict retarray, GFC_REAL_10 maxval; maxval = -GFC_REAL_10_HUGE; - result = 1; + result = 0; if (len <= 0) *dest = 0; else @@ -140,7 +140,7 @@ maxloc1_4_r10 (gfc_array_i4 * const restrict retarray, for (n = 0; n < len; n++, src += delta) { - if (*src > maxval) + if (*src > maxval || !result) { maxval = *src; result = (GFC_INTEGER_4)n + 1; @@ -299,7 +299,7 @@ mmaxloc1_4_r10 (gfc_array_i4 * const restrict retarray, GFC_REAL_10 maxval; maxval = -GFC_REAL_10_HUGE; - result = 1; + result = 0; if (len <= 0) *dest = 0; else @@ -307,7 +307,7 @@ mmaxloc1_4_r10 (gfc_array_i4 * const restrict retarray, for (n = 0; n < len; n++, src += delta, msrc += mdelta) { - if (*msrc && *src > maxval) + if (*msrc && (*src > maxval || !result)) { maxval = *src; result = (GFC_INTEGER_4)n + 1; diff --git a/libgfortran/generated/maxloc1_4_r16.c b/libgfortran/generated/maxloc1_4_r16.c index 5d7a5a1..6f6cd22 100644 --- a/libgfortran/generated/maxloc1_4_r16.c +++ b/libgfortran/generated/maxloc1_4_r16.c @@ -132,7 +132,7 @@ maxloc1_4_r16 (gfc_array_i4 * const restrict retarray, GFC_REAL_16 maxval; maxval = -GFC_REAL_16_HUGE; - result = 1; + result = 0; if (len <= 0) *dest = 0; else @@ -140,7 +140,7 @@ maxloc1_4_r16 (gfc_array_i4 * const restrict retarray, for (n = 0; n < len; n++, src += delta) { - if (*src > maxval) + if (*src > maxval || !result) { maxval = *src; result = (GFC_INTEGER_4)n + 1; @@ -299,7 +299,7 @@ mmaxloc1_4_r16 (gfc_array_i4 * const restrict retarray, GFC_REAL_16 maxval; maxval = -GFC_REAL_16_HUGE; - result = 1; + result = 0; if (len <= 0) *dest = 0; else @@ -307,7 +307,7 @@ mmaxloc1_4_r16 (gfc_array_i4 * const restrict retarray, for (n = 0; n < len; n++, src += delta, msrc += mdelta) { - if (*msrc && *src > maxval) + if (*msrc && (*src > maxval || !result)) { maxval = *src; result = (GFC_INTEGER_4)n + 1; diff --git a/libgfortran/generated/maxloc1_4_r4.c b/libgfortran/generated/maxloc1_4_r4.c index dd0de4b..3795ed8 100644 --- a/libgfortran/generated/maxloc1_4_r4.c +++ b/libgfortran/generated/maxloc1_4_r4.c @@ -132,7 +132,7 @@ maxloc1_4_r4 (gfc_array_i4 * const restrict retarray, GFC_REAL_4 maxval; maxval = -GFC_REAL_4_HUGE; - result = 1; + result = 0; if (len <= 0) *dest = 0; else @@ -140,7 +140,7 @@ maxloc1_4_r4 (gfc_array_i4 * const restrict retarray, for (n = 0; n < len; n++, src += delta) { - if (*src > maxval) + if (*src > maxval || !result) { maxval = *src; result = (GFC_INTEGER_4)n + 1; @@ -299,7 +299,7 @@ mmaxloc1_4_r4 (gfc_array_i4 * const restrict retarray, GFC_REAL_4 maxval; maxval = -GFC_REAL_4_HUGE; - result = 1; + result = 0; if (len <= 0) *dest = 0; else @@ -307,7 +307,7 @@ mmaxloc1_4_r4 (gfc_array_i4 * const restrict retarray, for (n = 0; n < len; n++, src += delta, msrc += mdelta) { - if (*msrc && *src > maxval) + if (*msrc && (*src > maxval || !result)) { maxval = *src; result = (GFC_INTEGER_4)n + 1; diff --git a/libgfortran/generated/maxloc1_4_r8.c b/libgfortran/generated/maxloc1_4_r8.c index fc0f9f5..82d4a67 100644 --- a/libgfortran/generated/maxloc1_4_r8.c +++ b/libgfortran/generated/maxloc1_4_r8.c @@ -132,7 +132,7 @@ maxloc1_4_r8 (gfc_array_i4 * const restrict retarray, GFC_REAL_8 maxval; maxval = -GFC_REAL_8_HUGE; - result = 1; + result = 0; if (len <= 0) *dest = 0; else @@ -140,7 +140,7 @@ maxloc1_4_r8 (gfc_array_i4 * const restrict retarray, for (n = 0; n < len; n++, src += delta) { - if (*src > maxval) + if (*src > maxval || !result) { maxval = *src; result = (GFC_INTEGER_4)n + 1; @@ -299,7 +299,7 @@ mmaxloc1_4_r8 (gfc_array_i4 * const restrict retarray, GFC_REAL_8 maxval; maxval = -GFC_REAL_8_HUGE; - result = 1; + result = 0; if (len <= 0) *dest = 0; else @@ -307,7 +307,7 @@ mmaxloc1_4_r8 (gfc_array_i4 * const restrict retarray, for (n = 0; n < len; n++, src += delta, msrc += mdelta) { - if (*msrc && *src > maxval) + if (*msrc && (*src > maxval || !result)) { maxval = *src; result = (GFC_INTEGER_4)n + 1; diff --git a/libgfortran/generated/maxloc1_8_i16.c b/libgfortran/generated/maxloc1_8_i16.c index 8feecfa..69cb35e 100644 --- a/libgfortran/generated/maxloc1_8_i16.c +++ b/libgfortran/generated/maxloc1_8_i16.c @@ -132,7 +132,7 @@ maxloc1_8_i16 (gfc_array_i8 * const restrict retarray, GFC_INTEGER_16 maxval; maxval = -GFC_INTEGER_16_HUGE; - result = 1; + result = 0; if (len <= 0) *dest = 0; else @@ -140,7 +140,7 @@ maxloc1_8_i16 (gfc_array_i8 * const restrict retarray, for (n = 0; n < len; n++, src += delta) { - if (*src > maxval) + if (*src > maxval || !result) { maxval = *src; result = (GFC_INTEGER_8)n + 1; @@ -299,7 +299,7 @@ mmaxloc1_8_i16 (gfc_array_i8 * const restrict retarray, GFC_INTEGER_16 maxval; maxval = -GFC_INTEGER_16_HUGE; - result = 1; + result = 0; if (len <= 0) *dest = 0; else @@ -307,7 +307,7 @@ mmaxloc1_8_i16 (gfc_array_i8 * const restrict retarray, for (n = 0; n < len; n++, src += delta, msrc += mdelta) { - if (*msrc && *src > maxval) + if (*msrc && (*src > maxval || !result)) { maxval = *src; result = (GFC_INTEGER_8)n + 1; diff --git a/libgfortran/generated/maxloc1_8_i4.c b/libgfortran/generated/maxloc1_8_i4.c index 0bc3cd8..6857896 100644 --- a/libgfortran/generated/maxloc1_8_i4.c +++ b/libgfortran/generated/maxloc1_8_i4.c @@ -132,7 +132,7 @@ maxloc1_8_i4 (gfc_array_i8 * const restrict retarray, GFC_INTEGER_4 maxval; maxval = -GFC_INTEGER_4_HUGE; - result = 1; + result = 0; if (len <= 0) *dest = 0; else @@ -140,7 +140,7 @@ maxloc1_8_i4 (gfc_array_i8 * const restrict retarray, for (n = 0; n < len; n++, src += delta) { - if (*src > maxval) + if (*src > maxval || !result) { maxval = *src; result = (GFC_INTEGER_8)n + 1; @@ -299,7 +299,7 @@ mmaxloc1_8_i4 (gfc_array_i8 * const restrict retarray, GFC_INTEGER_4 maxval; maxval = -GFC_INTEGER_4_HUGE; - result = 1; + result = 0; if (len <= 0) *dest = 0; else @@ -307,7 +307,7 @@ mmaxloc1_8_i4 (gfc_array_i8 * const restrict retarray, for (n = 0; n < len; n++, src += delta, msrc += mdelta) { - if (*msrc && *src > maxval) + if (*msrc && (*src > maxval || !result)) { maxval = *src; result = (GFC_INTEGER_8)n + 1; diff --git a/libgfortran/generated/maxloc1_8_i8.c b/libgfortran/generated/maxloc1_8_i8.c index dccffc0..5c5f836 100644 --- a/libgfortran/generated/maxloc1_8_i8.c +++ b/libgfortran/generated/maxloc1_8_i8.c @@ -132,7 +132,7 @@ maxloc1_8_i8 (gfc_array_i8 * const restrict retarray, GFC_INTEGER_8 maxval; maxval = -GFC_INTEGER_8_HUGE; - result = 1; + result = 0; if (len <= 0) *dest = 0; else @@ -140,7 +140,7 @@ maxloc1_8_i8 (gfc_array_i8 * const restrict retarray, for (n = 0; n < len; n++, src += delta) { - if (*src > maxval) + if (*src > maxval || !result) { maxval = *src; result = (GFC_INTEGER_8)n + 1; @@ -299,7 +299,7 @@ mmaxloc1_8_i8 (gfc_array_i8 * const restrict retarray, GFC_INTEGER_8 maxval; maxval = -GFC_INTEGER_8_HUGE; - result = 1; + result = 0; if (len <= 0) *dest = 0; else @@ -307,7 +307,7 @@ mmaxloc1_8_i8 (gfc_array_i8 * const restrict retarray, for (n = 0; n < len; n++, src += delta, msrc += mdelta) { - if (*msrc && *src > maxval) + if (*msrc && (*src > maxval || !result)) { maxval = *src; result = (GFC_INTEGER_8)n + 1; diff --git a/libgfortran/generated/maxloc1_8_r10.c b/libgfortran/generated/maxloc1_8_r10.c index 06c8cce..e4f17d49 100644 --- a/libgfortran/generated/maxloc1_8_r10.c +++ b/libgfortran/generated/maxloc1_8_r10.c @@ -132,7 +132,7 @@ maxloc1_8_r10 (gfc_array_i8 * const restrict retarray, GFC_REAL_10 maxval; maxval = -GFC_REAL_10_HUGE; - result = 1; + result = 0; if (len <= 0) *dest = 0; else @@ -140,7 +140,7 @@ maxloc1_8_r10 (gfc_array_i8 * const restrict retarray, for (n = 0; n < len; n++, src += delta) { - if (*src > maxval) + if (*src > maxval || !result) { maxval = *src; result = (GFC_INTEGER_8)n + 1; @@ -299,7 +299,7 @@ mmaxloc1_8_r10 (gfc_array_i8 * const restrict retarray, GFC_REAL_10 maxval; maxval = -GFC_REAL_10_HUGE; - result = 1; + result = 0; if (len <= 0) *dest = 0; else @@ -307,7 +307,7 @@ mmaxloc1_8_r10 (gfc_array_i8 * const restrict retarray, for (n = 0; n < len; n++, src += delta, msrc += mdelta) { - if (*msrc && *src > maxval) + if (*msrc && (*src > maxval || !result)) { maxval = *src; result = (GFC_INTEGER_8)n + 1; diff --git a/libgfortran/generated/maxloc1_8_r16.c b/libgfortran/generated/maxloc1_8_r16.c index 057724a..0a5dd51 100644 --- a/libgfortran/generated/maxloc1_8_r16.c +++ b/libgfortran/generated/maxloc1_8_r16.c @@ -132,7 +132,7 @@ maxloc1_8_r16 (gfc_array_i8 * const restrict retarray, GFC_REAL_16 maxval; maxval = -GFC_REAL_16_HUGE; - result = 1; + result = 0; if (len <= 0) *dest = 0; else @@ -140,7 +140,7 @@ maxloc1_8_r16 (gfc_array_i8 * const restrict retarray, for (n = 0; n < len; n++, src += delta) { - if (*src > maxval) + if (*src > maxval || !result) { maxval = *src; result = (GFC_INTEGER_8)n + 1; @@ -299,7 +299,7 @@ mmaxloc1_8_r16 (gfc_array_i8 * const restrict retarray, GFC_REAL_16 maxval; maxval = -GFC_REAL_16_HUGE; - result = 1; + result = 0; if (len <= 0) *dest = 0; else @@ -307,7 +307,7 @@ mmaxloc1_8_r16 (gfc_array_i8 * const restrict retarray, for (n = 0; n < len; n++, src += delta, msrc += mdelta) { - if (*msrc && *src > maxval) + if (*msrc && (*src > maxval || !result)) { maxval = *src; result = (GFC_INTEGER_8)n + 1; diff --git a/libgfortran/generated/maxloc1_8_r4.c b/libgfortran/generated/maxloc1_8_r4.c index 4775da2..15a82f2 100644 --- a/libgfortran/generated/maxloc1_8_r4.c +++ b/libgfortran/generated/maxloc1_8_r4.c @@ -132,7 +132,7 @@ maxloc1_8_r4 (gfc_array_i8 * const restrict retarray, GFC_REAL_4 maxval; maxval = -GFC_REAL_4_HUGE; - result = 1; + result = 0; if (len <= 0) *dest = 0; else @@ -140,7 +140,7 @@ maxloc1_8_r4 (gfc_array_i8 * const restrict retarray, for (n = 0; n < len; n++, src += delta) { - if (*src > maxval) + if (*src > maxval || !result) { maxval = *src; result = (GFC_INTEGER_8)n + 1; @@ -299,7 +299,7 @@ mmaxloc1_8_r4 (gfc_array_i8 * const restrict retarray, GFC_REAL_4 maxval; maxval = -GFC_REAL_4_HUGE; - result = 1; + result = 0; if (len <= 0) *dest = 0; else @@ -307,7 +307,7 @@ mmaxloc1_8_r4 (gfc_array_i8 * const restrict retarray, for (n = 0; n < len; n++, src += delta, msrc += mdelta) { - if (*msrc && *src > maxval) + if (*msrc && (*src > maxval || !result)) { maxval = *src; result = (GFC_INTEGER_8)n + 1; diff --git a/libgfortran/generated/maxloc1_8_r8.c b/libgfortran/generated/maxloc1_8_r8.c index 8035aa2..c89135e 100644 --- a/libgfortran/generated/maxloc1_8_r8.c +++ b/libgfortran/generated/maxloc1_8_r8.c @@ -132,7 +132,7 @@ maxloc1_8_r8 (gfc_array_i8 * const restrict retarray, GFC_REAL_8 maxval; maxval = -GFC_REAL_8_HUGE; - result = 1; + result = 0; if (len <= 0) *dest = 0; else @@ -140,7 +140,7 @@ maxloc1_8_r8 (gfc_array_i8 * const restrict retarray, for (n = 0; n < len; n++, src += delta) { - if (*src > maxval) + if (*src > maxval || !result) { maxval = *src; result = (GFC_INTEGER_8)n + 1; @@ -299,7 +299,7 @@ mmaxloc1_8_r8 (gfc_array_i8 * const restrict retarray, GFC_REAL_8 maxval; maxval = -GFC_REAL_8_HUGE; - result = 1; + result = 0; if (len <= 0) *dest = 0; else @@ -307,7 +307,7 @@ mmaxloc1_8_r8 (gfc_array_i8 * const restrict retarray, for (n = 0; n < len; n++, src += delta, msrc += mdelta) { - if (*msrc && *src > maxval) + if (*msrc && (*src > maxval || !result)) { maxval = *src; result = (GFC_INTEGER_8)n + 1; diff --git a/libgfortran/generated/minloc0_16_i16.c b/libgfortran/generated/minloc0_16_i16.c index 99d51ef..7bf58e3 100644 --- a/libgfortran/generated/minloc0_16_i16.c +++ b/libgfortran/generated/minloc0_16_i16.c @@ -106,7 +106,7 @@ minloc0_16_i16 (gfc_array_i16 * const restrict retarray, /* Initialize the return value. */ for (n = 0; n < rank; n++) - dest[n * dstride] = 1; + dest[n * dstride] = 0; { GFC_INTEGER_16 minval; @@ -118,7 +118,7 @@ minloc0_16_i16 (gfc_array_i16 * const restrict retarray, { /* Implementation start. */ - if (*base < minval) + if (*base < minval || !dest[0]) { minval = *base; for (n = 0; n < rank; n++) @@ -241,7 +241,7 @@ mminloc0_16_i16 (gfc_array_i16 * const restrict retarray, /* Initialize the return value. */ for (n = 0; n < rank; n++) - dest[n * dstride] = 1; + dest[n * dstride] = 0; { GFC_INTEGER_16 minval; @@ -253,7 +253,7 @@ mminloc0_16_i16 (gfc_array_i16 * const restrict retarray, { /* Implementation start. */ - if (*mbase && *base < minval) + if (*mbase && (*base < minval || !dest[0])) { minval = *base; for (n = 0; n < rank; n++) diff --git a/libgfortran/generated/minloc0_16_i4.c b/libgfortran/generated/minloc0_16_i4.c index 27b2beb..b42205b 100644 --- a/libgfortran/generated/minloc0_16_i4.c +++ b/libgfortran/generated/minloc0_16_i4.c @@ -106,7 +106,7 @@ minloc0_16_i4 (gfc_array_i16 * const restrict retarray, /* Initialize the return value. */ for (n = 0; n < rank; n++) - dest[n * dstride] = 1; + dest[n * dstride] = 0; { GFC_INTEGER_4 minval; @@ -118,7 +118,7 @@ minloc0_16_i4 (gfc_array_i16 * const restrict retarray, { /* Implementation start. */ - if (*base < minval) + if (*base < minval || !dest[0]) { minval = *base; for (n = 0; n < rank; n++) @@ -241,7 +241,7 @@ mminloc0_16_i4 (gfc_array_i16 * const restrict retarray, /* Initialize the return value. */ for (n = 0; n < rank; n++) - dest[n * dstride] = 1; + dest[n * dstride] = 0; { GFC_INTEGER_4 minval; @@ -253,7 +253,7 @@ mminloc0_16_i4 (gfc_array_i16 * const restrict retarray, { /* Implementation start. */ - if (*mbase && *base < minval) + if (*mbase && (*base < minval || !dest[0])) { minval = *base; for (n = 0; n < rank; n++) diff --git a/libgfortran/generated/minloc0_16_i8.c b/libgfortran/generated/minloc0_16_i8.c index eed2f9c..c687d10 100644 --- a/libgfortran/generated/minloc0_16_i8.c +++ b/libgfortran/generated/minloc0_16_i8.c @@ -106,7 +106,7 @@ minloc0_16_i8 (gfc_array_i16 * const restrict retarray, /* Initialize the return value. */ for (n = 0; n < rank; n++) - dest[n * dstride] = 1; + dest[n * dstride] = 0; { GFC_INTEGER_8 minval; @@ -118,7 +118,7 @@ minloc0_16_i8 (gfc_array_i16 * const restrict retarray, { /* Implementation start. */ - if (*base < minval) + if (*base < minval || !dest[0]) { minval = *base; for (n = 0; n < rank; n++) @@ -241,7 +241,7 @@ mminloc0_16_i8 (gfc_array_i16 * const restrict retarray, /* Initialize the return value. */ for (n = 0; n < rank; n++) - dest[n * dstride] = 1; + dest[n * dstride] = 0; { GFC_INTEGER_8 minval; @@ -253,7 +253,7 @@ mminloc0_16_i8 (gfc_array_i16 * const restrict retarray, { /* Implementation start. */ - if (*mbase && *base < minval) + if (*mbase && (*base < minval || !dest[0])) { minval = *base; for (n = 0; n < rank; n++) diff --git a/libgfortran/generated/minloc0_16_r10.c b/libgfortran/generated/minloc0_16_r10.c index 4126760..99ae91d 100644 --- a/libgfortran/generated/minloc0_16_r10.c +++ b/libgfortran/generated/minloc0_16_r10.c @@ -106,7 +106,7 @@ minloc0_16_r10 (gfc_array_i16 * const restrict retarray, /* Initialize the return value. */ for (n = 0; n < rank; n++) - dest[n * dstride] = 1; + dest[n * dstride] = 0; { GFC_REAL_10 minval; @@ -118,7 +118,7 @@ minloc0_16_r10 (gfc_array_i16 * const restrict retarray, { /* Implementation start. */ - if (*base < minval) + if (*base < minval || !dest[0]) { minval = *base; for (n = 0; n < rank; n++) @@ -241,7 +241,7 @@ mminloc0_16_r10 (gfc_array_i16 * const restrict retarray, /* Initialize the return value. */ for (n = 0; n < rank; n++) - dest[n * dstride] = 1; + dest[n * dstride] = 0; { GFC_REAL_10 minval; @@ -253,7 +253,7 @@ mminloc0_16_r10 (gfc_array_i16 * const restrict retarray, { /* Implementation start. */ - if (*mbase && *base < minval) + if (*mbase && (*base < minval || !dest[0])) { minval = *base; for (n = 0; n < rank; n++) diff --git a/libgfortran/generated/minloc0_16_r16.c b/libgfortran/generated/minloc0_16_r16.c index aad0889..d727f4c 100644 --- a/libgfortran/generated/minloc0_16_r16.c +++ b/libgfortran/generated/minloc0_16_r16.c @@ -106,7 +106,7 @@ minloc0_16_r16 (gfc_array_i16 * const restrict retarray, /* Initialize the return value. */ for (n = 0; n < rank; n++) - dest[n * dstride] = 1; + dest[n * dstride] = 0; { GFC_REAL_16 minval; @@ -118,7 +118,7 @@ minloc0_16_r16 (gfc_array_i16 * const restrict retarray, { /* Implementation start. */ - if (*base < minval) + if (*base < minval || !dest[0]) { minval = *base; for (n = 0; n < rank; n++) @@ -241,7 +241,7 @@ mminloc0_16_r16 (gfc_array_i16 * const restrict retarray, /* Initialize the return value. */ for (n = 0; n < rank; n++) - dest[n * dstride] = 1; + dest[n * dstride] = 0; { GFC_REAL_16 minval; @@ -253,7 +253,7 @@ mminloc0_16_r16 (gfc_array_i16 * const restrict retarray, { /* Implementation start. */ - if (*mbase && *base < minval) + if (*mbase && (*base < minval || !dest[0])) { minval = *base; for (n = 0; n < rank; n++) diff --git a/libgfortran/generated/minloc0_16_r4.c b/libgfortran/generated/minloc0_16_r4.c index 6a89b9b..501a668 100644 --- a/libgfortran/generated/minloc0_16_r4.c +++ b/libgfortran/generated/minloc0_16_r4.c @@ -106,7 +106,7 @@ minloc0_16_r4 (gfc_array_i16 * const restrict retarray, /* Initialize the return value. */ for (n = 0; n < rank; n++) - dest[n * dstride] = 1; + dest[n * dstride] = 0; { GFC_REAL_4 minval; @@ -118,7 +118,7 @@ minloc0_16_r4 (gfc_array_i16 * const restrict retarray, { /* Implementation start. */ - if (*base < minval) + if (*base < minval || !dest[0]) { minval = *base; for (n = 0; n < rank; n++) @@ -241,7 +241,7 @@ mminloc0_16_r4 (gfc_array_i16 * const restrict retarray, /* Initialize the return value. */ for (n = 0; n < rank; n++) - dest[n * dstride] = 1; + dest[n * dstride] = 0; { GFC_REAL_4 minval; @@ -253,7 +253,7 @@ mminloc0_16_r4 (gfc_array_i16 * const restrict retarray, { /* Implementation start. */ - if (*mbase && *base < minval) + if (*mbase && (*base < minval || !dest[0])) { minval = *base; for (n = 0; n < rank; n++) diff --git a/libgfortran/generated/minloc0_16_r8.c b/libgfortran/generated/minloc0_16_r8.c index 3eee3cf..57783b6 100644 --- a/libgfortran/generated/minloc0_16_r8.c +++ b/libgfortran/generated/minloc0_16_r8.c @@ -106,7 +106,7 @@ minloc0_16_r8 (gfc_array_i16 * const restrict retarray, /* Initialize the return value. */ for (n = 0; n < rank; n++) - dest[n * dstride] = 1; + dest[n * dstride] = 0; { GFC_REAL_8 minval; @@ -118,7 +118,7 @@ minloc0_16_r8 (gfc_array_i16 * const restrict retarray, { /* Implementation start. */ - if (*base < minval) + if (*base < minval || !dest[0]) { minval = *base; for (n = 0; n < rank; n++) @@ -241,7 +241,7 @@ mminloc0_16_r8 (gfc_array_i16 * const restrict retarray, /* Initialize the return value. */ for (n = 0; n < rank; n++) - dest[n * dstride] = 1; + dest[n * dstride] = 0; { GFC_REAL_8 minval; @@ -253,7 +253,7 @@ mminloc0_16_r8 (gfc_array_i16 * const restrict retarray, { /* Implementation start. */ - if (*mbase && *base < minval) + if (*mbase && (*base < minval || !dest[0])) { minval = *base; for (n = 0; n < rank; n++) diff --git a/libgfortran/generated/minloc0_4_i16.c b/libgfortran/generated/minloc0_4_i16.c index dde98ec..b71fbaa2 100644 --- a/libgfortran/generated/minloc0_4_i16.c +++ b/libgfortran/generated/minloc0_4_i16.c @@ -106,7 +106,7 @@ minloc0_4_i16 (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_16 minval; @@ -118,7 +118,7 @@ minloc0_4_i16 (gfc_array_i4 * const restrict retarray, { /* Implementation start. */ - if (*base < minval) + if (*base < minval || !dest[0]) { minval = *base; for (n = 0; n < rank; n++) @@ -241,7 +241,7 @@ mminloc0_4_i16 (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_16 minval; @@ -253,7 +253,7 @@ mminloc0_4_i16 (gfc_array_i4 * const restrict retarray, { /* Implementation start. */ - if (*mbase && *base < minval) + if (*mbase && (*base < minval || !dest[0])) { minval = *base; for (n = 0; n < rank; n++) diff --git a/libgfortran/generated/minloc0_4_i4.c b/libgfortran/generated/minloc0_4_i4.c index eb12d04..c655b1a 100644 --- a/libgfortran/generated/minloc0_4_i4.c +++ b/libgfortran/generated/minloc0_4_i4.c @@ -106,7 +106,7 @@ minloc0_4_i4 (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_4 minval; @@ -118,7 +118,7 @@ minloc0_4_i4 (gfc_array_i4 * const restrict retarray, { /* Implementation start. */ - if (*base < minval) + if (*base < minval || !dest[0]) { minval = *base; for (n = 0; n < rank; n++) @@ -241,7 +241,7 @@ mminloc0_4_i4 (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_4 minval; @@ -253,7 +253,7 @@ mminloc0_4_i4 (gfc_array_i4 * const restrict retarray, { /* Implementation start. */ - if (*mbase && *base < minval) + if (*mbase && (*base < minval || !dest[0])) { minval = *base; for (n = 0; n < rank; n++) diff --git a/libgfortran/generated/minloc0_4_i8.c b/libgfortran/generated/minloc0_4_i8.c index 715f932..7f94829 100644 --- a/libgfortran/generated/minloc0_4_i8.c +++ b/libgfortran/generated/minloc0_4_i8.c @@ -106,7 +106,7 @@ minloc0_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 minval; @@ -118,7 +118,7 @@ minloc0_4_i8 (gfc_array_i4 * const restrict retarray, { /* Implementation start. */ - if (*base < minval) + if (*base < minval || !dest[0]) { minval = *base; for (n = 0; n < rank; n++) @@ -241,7 +241,7 @@ mminloc0_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 minval; @@ -253,7 +253,7 @@ mminloc0_4_i8 (gfc_array_i4 * const restrict retarray, { /* Implementation start. */ - if (*mbase && *base < minval) + if (*mbase && (*base < minval || !dest[0])) { minval = *base; for (n = 0; n < rank; n++) diff --git a/libgfortran/generated/minloc0_4_r10.c b/libgfortran/generated/minloc0_4_r10.c index 43118ce..a29677d 100644 --- a/libgfortran/generated/minloc0_4_r10.c +++ b/libgfortran/generated/minloc0_4_r10.c @@ -106,7 +106,7 @@ minloc0_4_r10 (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_REAL_10 minval; @@ -118,7 +118,7 @@ minloc0_4_r10 (gfc_array_i4 * const restrict retarray, { /* Implementation start. */ - if (*base < minval) + if (*base < minval || !dest[0]) { minval = *base; for (n = 0; n < rank; n++) @@ -241,7 +241,7 @@ mminloc0_4_r10 (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_REAL_10 minval; @@ -253,7 +253,7 @@ mminloc0_4_r10 (gfc_array_i4 * const restrict retarray, { /* Implementation start. */ - if (*mbase && *base < minval) + if (*mbase && (*base < minval || !dest[0])) { minval = *base; for (n = 0; n < rank; n++) diff --git a/libgfortran/generated/minloc0_4_r16.c b/libgfortran/generated/minloc0_4_r16.c index 3751d07..61cf4b1 100644 --- a/libgfortran/generated/minloc0_4_r16.c +++ b/libgfortran/generated/minloc0_4_r16.c @@ -106,7 +106,7 @@ minloc0_4_r16 (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_REAL_16 minval; @@ -118,7 +118,7 @@ minloc0_4_r16 (gfc_array_i4 * const restrict retarray, { /* Implementation start. */ - if (*base < minval) + if (*base < minval || !dest[0]) { minval = *base; for (n = 0; n < rank; n++) @@ -241,7 +241,7 @@ mminloc0_4_r16 (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_REAL_16 minval; @@ -253,7 +253,7 @@ mminloc0_4_r16 (gfc_array_i4 * const restrict retarray, { /* Implementation start. */ - if (*mbase && *base < minval) + if (*mbase && (*base < minval || !dest[0])) { minval = *base; for (n = 0; n < rank; n++) diff --git a/libgfortran/generated/minloc0_4_r4.c b/libgfortran/generated/minloc0_4_r4.c index 0c93800..f55bbae 100644 --- a/libgfortran/generated/minloc0_4_r4.c +++ b/libgfortran/generated/minloc0_4_r4.c @@ -106,7 +106,7 @@ minloc0_4_r4 (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_REAL_4 minval; @@ -118,7 +118,7 @@ minloc0_4_r4 (gfc_array_i4 * const restrict retarray, { /* Implementation start. */ - if (*base < minval) + if (*base < minval || !dest[0]) { minval = *base; for (n = 0; n < rank; n++) @@ -241,7 +241,7 @@ mminloc0_4_r4 (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_REAL_4 minval; @@ -253,7 +253,7 @@ mminloc0_4_r4 (gfc_array_i4 * const restrict retarray, { /* Implementation start. */ - if (*mbase && *base < minval) + if (*mbase && (*base < minval || !dest[0])) { minval = *base; for (n = 0; n < rank; n++) diff --git a/libgfortran/generated/minloc0_4_r8.c b/libgfortran/generated/minloc0_4_r8.c index 4226dfd..d8a2f82 100644 --- a/libgfortran/generated/minloc0_4_r8.c +++ b/libgfortran/generated/minloc0_4_r8.c @@ -106,7 +106,7 @@ minloc0_4_r8 (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_REAL_8 minval; @@ -118,7 +118,7 @@ minloc0_4_r8 (gfc_array_i4 * const restrict retarray, { /* Implementation start. */ - if (*base < minval) + if (*base < minval || !dest[0]) { minval = *base; for (n = 0; n < rank; n++) @@ -241,7 +241,7 @@ mminloc0_4_r8 (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_REAL_8 minval; @@ -253,7 +253,7 @@ mminloc0_4_r8 (gfc_array_i4 * const restrict retarray, { /* Implementation start. */ - if (*mbase && *base < minval) + if (*mbase && (*base < minval || !dest[0])) { minval = *base; for (n = 0; n < rank; n++) diff --git a/libgfortran/generated/minloc0_8_i16.c b/libgfortran/generated/minloc0_8_i16.c index 71eaec4..a6346cf 100644 --- a/libgfortran/generated/minloc0_8_i16.c +++ b/libgfortran/generated/minloc0_8_i16.c @@ -106,7 +106,7 @@ minloc0_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 minval; @@ -118,7 +118,7 @@ minloc0_8_i16 (gfc_array_i8 * const restrict retarray, { /* Implementation start. */ - if (*base < minval) + if (*base < minval || !dest[0]) { minval = *base; for (n = 0; n < rank; n++) @@ -241,7 +241,7 @@ mminloc0_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 minval; @@ -253,7 +253,7 @@ mminloc0_8_i16 (gfc_array_i8 * const restrict retarray, { /* Implementation start. */ - if (*mbase && *base < minval) + if (*mbase && (*base < minval || !dest[0])) { minval = *base; for (n = 0; n < rank; n++) diff --git a/libgfortran/generated/minloc0_8_i4.c b/libgfortran/generated/minloc0_8_i4.c index c1871f2..2aa5453 100644 --- a/libgfortran/generated/minloc0_8_i4.c +++ b/libgfortran/generated/minloc0_8_i4.c @@ -106,7 +106,7 @@ minloc0_8_i4 (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_4 minval; @@ -118,7 +118,7 @@ minloc0_8_i4 (gfc_array_i8 * const restrict retarray, { /* Implementation start. */ - if (*base < minval) + if (*base < minval || !dest[0]) { minval = *base; for (n = 0; n < rank; n++) @@ -241,7 +241,7 @@ mminloc0_8_i4 (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_4 minval; @@ -253,7 +253,7 @@ mminloc0_8_i4 (gfc_array_i8 * const restrict retarray, { /* Implementation start. */ - if (*mbase && *base < minval) + if (*mbase && (*base < minval || !dest[0])) { minval = *base; for (n = 0; n < rank; n++) diff --git a/libgfortran/generated/minloc0_8_i8.c b/libgfortran/generated/minloc0_8_i8.c index b3fbaff..63dd21a 100644 --- a/libgfortran/generated/minloc0_8_i8.c +++ b/libgfortran/generated/minloc0_8_i8.c @@ -106,7 +106,7 @@ minloc0_8_i8 (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_8 minval; @@ -118,7 +118,7 @@ minloc0_8_i8 (gfc_array_i8 * const restrict retarray, { /* Implementation start. */ - if (*base < minval) + if (*base < minval || !dest[0]) { minval = *base; for (n = 0; n < rank; n++) @@ -241,7 +241,7 @@ mminloc0_8_i8 (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_8 minval; @@ -253,7 +253,7 @@ mminloc0_8_i8 (gfc_array_i8 * const restrict retarray, { /* Implementation start. */ - if (*mbase && *base < minval) + if (*mbase && (*base < minval || !dest[0])) { minval = *base; for (n = 0; n < rank; n++) diff --git a/libgfortran/generated/minloc0_8_r10.c b/libgfortran/generated/minloc0_8_r10.c index 9cdf5c6..c627e7e 100644 --- a/libgfortran/generated/minloc0_8_r10.c +++ b/libgfortran/generated/minloc0_8_r10.c @@ -106,7 +106,7 @@ minloc0_8_r10 (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_REAL_10 minval; @@ -118,7 +118,7 @@ minloc0_8_r10 (gfc_array_i8 * const restrict retarray, { /* Implementation start. */ - if (*base < minval) + if (*base < minval || !dest[0]) { minval = *base; for (n = 0; n < rank; n++) @@ -241,7 +241,7 @@ mminloc0_8_r10 (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_REAL_10 minval; @@ -253,7 +253,7 @@ mminloc0_8_r10 (gfc_array_i8 * const restrict retarray, { /* Implementation start. */ - if (*mbase && *base < minval) + if (*mbase && (*base < minval || !dest[0])) { minval = *base; for (n = 0; n < rank; n++) diff --git a/libgfortran/generated/minloc0_8_r16.c b/libgfortran/generated/minloc0_8_r16.c index dc86f6f..d4e3071 100644 --- a/libgfortran/generated/minloc0_8_r16.c +++ b/libgfortran/generated/minloc0_8_r16.c @@ -106,7 +106,7 @@ minloc0_8_r16 (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_REAL_16 minval; @@ -118,7 +118,7 @@ minloc0_8_r16 (gfc_array_i8 * const restrict retarray, { /* Implementation start. */ - if (*base < minval) + if (*base < minval || !dest[0]) { minval = *base; for (n = 0; n < rank; n++) @@ -241,7 +241,7 @@ mminloc0_8_r16 (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_REAL_16 minval; @@ -253,7 +253,7 @@ mminloc0_8_r16 (gfc_array_i8 * const restrict retarray, { /* Implementation start. */ - if (*mbase && *base < minval) + if (*mbase && (*base < minval || !dest[0])) { minval = *base; for (n = 0; n < rank; n++) diff --git a/libgfortran/generated/minloc0_8_r4.c b/libgfortran/generated/minloc0_8_r4.c index 985d60c..c484e8d 100644 --- a/libgfortran/generated/minloc0_8_r4.c +++ b/libgfortran/generated/minloc0_8_r4.c @@ -106,7 +106,7 @@ minloc0_8_r4 (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_REAL_4 minval; @@ -118,7 +118,7 @@ minloc0_8_r4 (gfc_array_i8 * const restrict retarray, { /* Implementation start. */ - if (*base < minval) + if (*base < minval || !dest[0]) { minval = *base; for (n = 0; n < rank; n++) @@ -241,7 +241,7 @@ mminloc0_8_r4 (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_REAL_4 minval; @@ -253,7 +253,7 @@ mminloc0_8_r4 (gfc_array_i8 * const restrict retarray, { /* Implementation start. */ - if (*mbase && *base < minval) + if (*mbase && (*base < minval || !dest[0])) { minval = *base; for (n = 0; n < rank; n++) diff --git a/libgfortran/generated/minloc0_8_r8.c b/libgfortran/generated/minloc0_8_r8.c index fe98a1e..97f19ce 100644 --- a/libgfortran/generated/minloc0_8_r8.c +++ b/libgfortran/generated/minloc0_8_r8.c @@ -106,7 +106,7 @@ minloc0_8_r8 (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_REAL_8 minval; @@ -118,7 +118,7 @@ minloc0_8_r8 (gfc_array_i8 * const restrict retarray, { /* Implementation start. */ - if (*base < minval) + if (*base < minval || !dest[0]) { minval = *base; for (n = 0; n < rank; n++) @@ -241,7 +241,7 @@ mminloc0_8_r8 (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_REAL_8 minval; @@ -253,7 +253,7 @@ mminloc0_8_r8 (gfc_array_i8 * const restrict retarray, { /* Implementation start. */ - if (*mbase && *base < minval) + if (*mbase && (*base < minval || !dest[0])) { minval = *base; for (n = 0; n < rank; n++) diff --git a/libgfortran/generated/minloc1_16_i16.c b/libgfortran/generated/minloc1_16_i16.c index 5b69c55..75e5054 100644 --- a/libgfortran/generated/minloc1_16_i16.c +++ b/libgfortran/generated/minloc1_16_i16.c @@ -132,7 +132,7 @@ minloc1_16_i16 (gfc_array_i16 * const restrict retarray, GFC_INTEGER_16 minval; minval = GFC_INTEGER_16_HUGE; - result = 1; + result = 0; if (len <= 0) *dest = 0; else @@ -140,7 +140,7 @@ minloc1_16_i16 (gfc_array_i16 * const restrict retarray, for (n = 0; n < len; n++, src += delta) { - if (*src < minval) + if (*src < minval || !result) { minval = *src; result = (GFC_INTEGER_16)n + 1; @@ -299,7 +299,7 @@ mminloc1_16_i16 (gfc_array_i16 * const restrict retarray, GFC_INTEGER_16 minval; minval = GFC_INTEGER_16_HUGE; - result = 1; + result = 0; if (len <= 0) *dest = 0; else @@ -307,7 +307,7 @@ mminloc1_16_i16 (gfc_array_i16 * 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_16)n + 1; diff --git a/libgfortran/generated/minloc1_16_i4.c b/libgfortran/generated/minloc1_16_i4.c index 8d59189..d2fdd54 100644 --- a/libgfortran/generated/minloc1_16_i4.c +++ b/libgfortran/generated/minloc1_16_i4.c @@ -132,7 +132,7 @@ minloc1_16_i4 (gfc_array_i16 * 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_16_i4 (gfc_array_i16 * const restrict retarray, for (n = 0; n < len; n++, src += delta) { - if (*src < minval) + if (*src < minval || !result) { minval = *src; result = (GFC_INTEGER_16)n + 1; @@ -299,7 +299,7 @@ mminloc1_16_i4 (gfc_array_i16 * 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_16_i4 (gfc_array_i16 * 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_16)n + 1; diff --git a/libgfortran/generated/minloc1_16_i8.c b/libgfortran/generated/minloc1_16_i8.c index d3f6995..19ac6d7 100644 --- a/libgfortran/generated/minloc1_16_i8.c +++ b/libgfortran/generated/minloc1_16_i8.c @@ -132,7 +132,7 @@ minloc1_16_i8 (gfc_array_i16 * const restrict retarray, GFC_INTEGER_8 minval; minval = GFC_INTEGER_8_HUGE; - result = 1; + result = 0; if (len <= 0) *dest = 0; else @@ -140,7 +140,7 @@ minloc1_16_i8 (gfc_array_i16 * const restrict retarray, for (n = 0; n < len; n++, src += delta) { - if (*src < minval) + if (*src < minval || !result) { minval = *src; result = (GFC_INTEGER_16)n + 1; @@ -299,7 +299,7 @@ mminloc1_16_i8 (gfc_array_i16 * const restrict retarray, GFC_INTEGER_8 minval; minval = GFC_INTEGER_8_HUGE; - result = 1; + result = 0; if (len <= 0) *dest = 0; else @@ -307,7 +307,7 @@ mminloc1_16_i8 (gfc_array_i16 * 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_16)n + 1; diff --git a/libgfortran/generated/minloc1_16_r10.c b/libgfortran/generated/minloc1_16_r10.c index 0e3d605..cc3d59b 100644 --- a/libgfortran/generated/minloc1_16_r10.c +++ b/libgfortran/generated/minloc1_16_r10.c @@ -132,7 +132,7 @@ minloc1_16_r10 (gfc_array_i16 * const restrict retarray, GFC_REAL_10 minval; minval = GFC_REAL_10_HUGE; - result = 1; + result = 0; if (len <= 0) *dest = 0; else @@ -140,7 +140,7 @@ minloc1_16_r10 (gfc_array_i16 * const restrict retarray, for (n = 0; n < len; n++, src += delta) { - if (*src < minval) + if (*src < minval || !result) { minval = *src; result = (GFC_INTEGER_16)n + 1; @@ -299,7 +299,7 @@ mminloc1_16_r10 (gfc_array_i16 * const restrict retarray, GFC_REAL_10 minval; minval = GFC_REAL_10_HUGE; - result = 1; + result = 0; if (len <= 0) *dest = 0; else @@ -307,7 +307,7 @@ mminloc1_16_r10 (gfc_array_i16 * 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_16)n + 1; diff --git a/libgfortran/generated/minloc1_16_r16.c b/libgfortran/generated/minloc1_16_r16.c index 29dfe1d..76e8787 100644 --- a/libgfortran/generated/minloc1_16_r16.c +++ b/libgfortran/generated/minloc1_16_r16.c @@ -132,7 +132,7 @@ minloc1_16_r16 (gfc_array_i16 * const restrict retarray, GFC_REAL_16 minval; minval = GFC_REAL_16_HUGE; - result = 1; + result = 0; if (len <= 0) *dest = 0; else @@ -140,7 +140,7 @@ minloc1_16_r16 (gfc_array_i16 * const restrict retarray, for (n = 0; n < len; n++, src += delta) { - if (*src < minval) + if (*src < minval || !result) { minval = *src; result = (GFC_INTEGER_16)n + 1; @@ -299,7 +299,7 @@ mminloc1_16_r16 (gfc_array_i16 * const restrict retarray, GFC_REAL_16 minval; minval = GFC_REAL_16_HUGE; - result = 1; + result = 0; if (len <= 0) *dest = 0; else @@ -307,7 +307,7 @@ mminloc1_16_r16 (gfc_array_i16 * 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_16)n + 1; diff --git a/libgfortran/generated/minloc1_16_r4.c b/libgfortran/generated/minloc1_16_r4.c index 65ffe2c..46ed3b6 100644 --- a/libgfortran/generated/minloc1_16_r4.c +++ b/libgfortran/generated/minloc1_16_r4.c @@ -132,7 +132,7 @@ minloc1_16_r4 (gfc_array_i16 * const restrict retarray, GFC_REAL_4 minval; minval = GFC_REAL_4_HUGE; - result = 1; + result = 0; if (len <= 0) *dest = 0; else @@ -140,7 +140,7 @@ minloc1_16_r4 (gfc_array_i16 * const restrict retarray, for (n = 0; n < len; n++, src += delta) { - if (*src < minval) + if (*src < minval || !result) { minval = *src; result = (GFC_INTEGER_16)n + 1; @@ -299,7 +299,7 @@ mminloc1_16_r4 (gfc_array_i16 * const restrict retarray, GFC_REAL_4 minval; minval = GFC_REAL_4_HUGE; - result = 1; + result = 0; if (len <= 0) *dest = 0; else @@ -307,7 +307,7 @@ mminloc1_16_r4 (gfc_array_i16 * 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_16)n + 1; diff --git a/libgfortran/generated/minloc1_16_r8.c b/libgfortran/generated/minloc1_16_r8.c index 379ca41..2d8bbf9 100644 --- a/libgfortran/generated/minloc1_16_r8.c +++ b/libgfortran/generated/minloc1_16_r8.c @@ -132,7 +132,7 @@ minloc1_16_r8 (gfc_array_i16 * const restrict retarray, GFC_REAL_8 minval; minval = GFC_REAL_8_HUGE; - result = 1; + result = 0; if (len <= 0) *dest = 0; else @@ -140,7 +140,7 @@ minloc1_16_r8 (gfc_array_i16 * const restrict retarray, for (n = 0; n < len; n++, src += delta) { - if (*src < minval) + if (*src < minval || !result) { minval = *src; result = (GFC_INTEGER_16)n + 1; @@ -299,7 +299,7 @@ mminloc1_16_r8 (gfc_array_i16 * const restrict retarray, GFC_REAL_8 minval; minval = GFC_REAL_8_HUGE; - result = 1; + result = 0; if (len <= 0) *dest = 0; else @@ -307,7 +307,7 @@ mminloc1_16_r8 (gfc_array_i16 * 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_16)n + 1; diff --git a/libgfortran/generated/minloc1_4_i16.c b/libgfortran/generated/minloc1_4_i16.c index 13ac2d9..94712f4 100644 --- a/libgfortran/generated/minloc1_4_i16.c +++ b/libgfortran/generated/minloc1_4_i16.c @@ -132,7 +132,7 @@ minloc1_4_i16 (gfc_array_i4 * const restrict retarray, GFC_INTEGER_16 minval; minval = GFC_INTEGER_16_HUGE; - result = 1; + result = 0; if (len <= 0) *dest = 0; else @@ -140,7 +140,7 @@ minloc1_4_i16 (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_i16 (gfc_array_i4 * const restrict retarray, GFC_INTEGER_16 minval; minval = GFC_INTEGER_16_HUGE; - result = 1; + result = 0; if (len <= 0) *dest = 0; else @@ -307,7 +307,7 @@ mminloc1_4_i16 (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; diff --git a/libgfortran/generated/minloc1_4_i4.c b/libgfortran/generated/minloc1_4_i4.c index c9f5194..a80d2c6 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; diff --git a/libgfortran/generated/minloc1_4_i8.c b/libgfortran/generated/minloc1_4_i8.c index 57aee81..55c8370 100644 --- a/libgfortran/generated/minloc1_4_i8.c +++ b/libgfortran/generated/minloc1_4_i8.c @@ -132,7 +132,7 @@ minloc1_4_i8 (gfc_array_i4 * const restrict retarray, GFC_INTEGER_8 minval; minval = GFC_INTEGER_8_HUGE; - result = 1; + result = 0; if (len <= 0) *dest = 0; else @@ -140,7 +140,7 @@ minloc1_4_i8 (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_i8 (gfc_array_i4 * const restrict retarray, GFC_INTEGER_8 minval; minval = GFC_INTEGER_8_HUGE; - result = 1; + result = 0; if (len <= 0) *dest = 0; else @@ -307,7 +307,7 @@ mminloc1_4_i8 (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; diff --git a/libgfortran/generated/minloc1_4_r10.c b/libgfortran/generated/minloc1_4_r10.c index d33be84..1d9b7547 100644 --- a/libgfortran/generated/minloc1_4_r10.c +++ b/libgfortran/generated/minloc1_4_r10.c @@ -132,7 +132,7 @@ minloc1_4_r10 (gfc_array_i4 * const restrict retarray, GFC_REAL_10 minval; minval = GFC_REAL_10_HUGE; - result = 1; + result = 0; if (len <= 0) *dest = 0; else @@ -140,7 +140,7 @@ minloc1_4_r10 (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_r10 (gfc_array_i4 * const restrict retarray, GFC_REAL_10 minval; minval = GFC_REAL_10_HUGE; - result = 1; + result = 0; if (len <= 0) *dest = 0; else @@ -307,7 +307,7 @@ mminloc1_4_r10 (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; diff --git a/libgfortran/generated/minloc1_4_r16.c b/libgfortran/generated/minloc1_4_r16.c index fb602e2..df903cb 100644 --- a/libgfortran/generated/minloc1_4_r16.c +++ b/libgfortran/generated/minloc1_4_r16.c @@ -132,7 +132,7 @@ minloc1_4_r16 (gfc_array_i4 * const restrict retarray, GFC_REAL_16 minval; minval = GFC_REAL_16_HUGE; - result = 1; + result = 0; if (len <= 0) *dest = 0; else @@ -140,7 +140,7 @@ minloc1_4_r16 (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_r16 (gfc_array_i4 * const restrict retarray, GFC_REAL_16 minval; minval = GFC_REAL_16_HUGE; - result = 1; + result = 0; if (len <= 0) *dest = 0; else @@ -307,7 +307,7 @@ mminloc1_4_r16 (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; diff --git a/libgfortran/generated/minloc1_4_r4.c b/libgfortran/generated/minloc1_4_r4.c index d8e7fbf..e723e92 100644 --- a/libgfortran/generated/minloc1_4_r4.c +++ b/libgfortran/generated/minloc1_4_r4.c @@ -132,7 +132,7 @@ minloc1_4_r4 (gfc_array_i4 * const restrict retarray, GFC_REAL_4 minval; minval = GFC_REAL_4_HUGE; - result = 1; + result = 0; if (len <= 0) *dest = 0; else @@ -140,7 +140,7 @@ minloc1_4_r4 (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_r4 (gfc_array_i4 * const restrict retarray, GFC_REAL_4 minval; minval = GFC_REAL_4_HUGE; - result = 1; + result = 0; if (len <= 0) *dest = 0; else @@ -307,7 +307,7 @@ mminloc1_4_r4 (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; diff --git a/libgfortran/generated/minloc1_4_r8.c b/libgfortran/generated/minloc1_4_r8.c index a0f018b..5fbf3ec 100644 --- a/libgfortran/generated/minloc1_4_r8.c +++ b/libgfortran/generated/minloc1_4_r8.c @@ -132,7 +132,7 @@ minloc1_4_r8 (gfc_array_i4 * const restrict retarray, GFC_REAL_8 minval; minval = GFC_REAL_8_HUGE; - result = 1; + result = 0; if (len <= 0) *dest = 0; else @@ -140,7 +140,7 @@ minloc1_4_r8 (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_r8 (gfc_array_i4 * const restrict retarray, GFC_REAL_8 minval; minval = GFC_REAL_8_HUGE; - result = 1; + result = 0; if (len <= 0) *dest = 0; else @@ -307,7 +307,7 @@ mminloc1_4_r8 (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; diff --git a/libgfortran/generated/minloc1_8_i16.c b/libgfortran/generated/minloc1_8_i16.c index 9e90549..07cbf78 100644 --- a/libgfortran/generated/minloc1_8_i16.c +++ b/libgfortran/generated/minloc1_8_i16.c @@ -132,7 +132,7 @@ minloc1_8_i16 (gfc_array_i8 * const restrict retarray, GFC_INTEGER_16 minval; minval = GFC_INTEGER_16_HUGE; - result = 1; + result = 0; if (len <= 0) *dest = 0; else @@ -140,7 +140,7 @@ minloc1_8_i16 (gfc_array_i8 * const restrict retarray, for (n = 0; n < len; n++, src += delta) { - if (*src < minval) + if (*src < minval || !result) { minval = *src; result = (GFC_INTEGER_8)n + 1; @@ -299,7 +299,7 @@ mminloc1_8_i16 (gfc_array_i8 * const restrict retarray, GFC_INTEGER_16 minval; minval = GFC_INTEGER_16_HUGE; - result = 1; + result = 0; if (len <= 0) *dest = 0; else @@ -307,7 +307,7 @@ mminloc1_8_i16 (gfc_array_i8 * 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_8)n + 1; diff --git a/libgfortran/generated/minloc1_8_i4.c b/libgfortran/generated/minloc1_8_i4.c index 078ba6f..917c0b2 100644 --- a/libgfortran/generated/minloc1_8_i4.c +++ b/libgfortran/generated/minloc1_8_i4.c @@ -132,7 +132,7 @@ minloc1_8_i4 (gfc_array_i8 * 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_8_i4 (gfc_array_i8 * const restrict retarray, for (n = 0; n < len; n++, src += delta) { - if (*src < minval) + if (*src < minval || !result) { minval = *src; result = (GFC_INTEGER_8)n + 1; @@ -299,7 +299,7 @@ mminloc1_8_i4 (gfc_array_i8 * 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_8_i4 (gfc_array_i8 * 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_8)n + 1; diff --git a/libgfortran/generated/minloc1_8_i8.c b/libgfortran/generated/minloc1_8_i8.c index 6de37f1..c9a1527 100644 --- a/libgfortran/generated/minloc1_8_i8.c +++ b/libgfortran/generated/minloc1_8_i8.c @@ -132,7 +132,7 @@ minloc1_8_i8 (gfc_array_i8 * const restrict retarray, GFC_INTEGER_8 minval; minval = GFC_INTEGER_8_HUGE; - result = 1; + result = 0; if (len <= 0) *dest = 0; else @@ -140,7 +140,7 @@ minloc1_8_i8 (gfc_array_i8 * const restrict retarray, for (n = 0; n < len; n++, src += delta) { - if (*src < minval) + if (*src < minval || !result) { minval = *src; result = (GFC_INTEGER_8)n + 1; @@ -299,7 +299,7 @@ mminloc1_8_i8 (gfc_array_i8 * const restrict retarray, GFC_INTEGER_8 minval; minval = GFC_INTEGER_8_HUGE; - result = 1; + result = 0; if (len <= 0) *dest = 0; else @@ -307,7 +307,7 @@ mminloc1_8_i8 (gfc_array_i8 * 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_8)n + 1; diff --git a/libgfortran/generated/minloc1_8_r10.c b/libgfortran/generated/minloc1_8_r10.c index cb6d4d4..c36838c 100644 --- a/libgfortran/generated/minloc1_8_r10.c +++ b/libgfortran/generated/minloc1_8_r10.c @@ -132,7 +132,7 @@ minloc1_8_r10 (gfc_array_i8 * const restrict retarray, GFC_REAL_10 minval; minval = GFC_REAL_10_HUGE; - result = 1; + result = 0; if (len <= 0) *dest = 0; else @@ -140,7 +140,7 @@ minloc1_8_r10 (gfc_array_i8 * const restrict retarray, for (n = 0; n < len; n++, src += delta) { - if (*src < minval) + if (*src < minval || !result) { minval = *src; result = (GFC_INTEGER_8)n + 1; @@ -299,7 +299,7 @@ mminloc1_8_r10 (gfc_array_i8 * const restrict retarray, GFC_REAL_10 minval; minval = GFC_REAL_10_HUGE; - result = 1; + result = 0; if (len <= 0) *dest = 0; else @@ -307,7 +307,7 @@ mminloc1_8_r10 (gfc_array_i8 * 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_8)n + 1; diff --git a/libgfortran/generated/minloc1_8_r16.c b/libgfortran/generated/minloc1_8_r16.c index d0a0445..9335294 100644 --- a/libgfortran/generated/minloc1_8_r16.c +++ b/libgfortran/generated/minloc1_8_r16.c @@ -132,7 +132,7 @@ minloc1_8_r16 (gfc_array_i8 * const restrict retarray, GFC_REAL_16 minval; minval = GFC_REAL_16_HUGE; - result = 1; + result = 0; if (len <= 0) *dest = 0; else @@ -140,7 +140,7 @@ minloc1_8_r16 (gfc_array_i8 * const restrict retarray, for (n = 0; n < len; n++, src += delta) { - if (*src < minval) + if (*src < minval || !result) { minval = *src; result = (GFC_INTEGER_8)n + 1; @@ -299,7 +299,7 @@ mminloc1_8_r16 (gfc_array_i8 * const restrict retarray, GFC_REAL_16 minval; minval = GFC_REAL_16_HUGE; - result = 1; + result = 0; if (len <= 0) *dest = 0; else @@ -307,7 +307,7 @@ mminloc1_8_r16 (gfc_array_i8 * 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_8)n + 1; diff --git a/libgfortran/generated/minloc1_8_r4.c b/libgfortran/generated/minloc1_8_r4.c index ec8e612..69ebc29 100644 --- a/libgfortran/generated/minloc1_8_r4.c +++ b/libgfortran/generated/minloc1_8_r4.c @@ -132,7 +132,7 @@ minloc1_8_r4 (gfc_array_i8 * const restrict retarray, GFC_REAL_4 minval; minval = GFC_REAL_4_HUGE; - result = 1; + result = 0; if (len <= 0) *dest = 0; else @@ -140,7 +140,7 @@ minloc1_8_r4 (gfc_array_i8 * const restrict retarray, for (n = 0; n < len; n++, src += delta) { - if (*src < minval) + if (*src < minval || !result) { minval = *src; result = (GFC_INTEGER_8)n + 1; @@ -299,7 +299,7 @@ mminloc1_8_r4 (gfc_array_i8 * const restrict retarray, GFC_REAL_4 minval; minval = GFC_REAL_4_HUGE; - result = 1; + result = 0; if (len <= 0) *dest = 0; else @@ -307,7 +307,7 @@ mminloc1_8_r4 (gfc_array_i8 * 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_8)n + 1; diff --git a/libgfortran/generated/minloc1_8_r8.c b/libgfortran/generated/minloc1_8_r8.c index ef2dd2b..7d662d5 100644 --- a/libgfortran/generated/minloc1_8_r8.c +++ b/libgfortran/generated/minloc1_8_r8.c @@ -132,7 +132,7 @@ minloc1_8_r8 (gfc_array_i8 * const restrict retarray, GFC_REAL_8 minval; minval = GFC_REAL_8_HUGE; - result = 1; + result = 0; if (len <= 0) *dest = 0; else @@ -140,7 +140,7 @@ minloc1_8_r8 (gfc_array_i8 * const restrict retarray, for (n = 0; n < len; n++, src += delta) { - if (*src < minval) + if (*src < minval || !result) { minval = *src; result = (GFC_INTEGER_8)n + 1; @@ -299,7 +299,7 @@ mminloc1_8_r8 (gfc_array_i8 * const restrict retarray, GFC_REAL_8 minval; minval = GFC_REAL_8_HUGE; - result = 1; + result = 0; if (len <= 0) *dest = 0; else @@ -307,7 +307,7 @@ mminloc1_8_r8 (gfc_array_i8 * 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_8)n + 1; |