diff options
Diffstat (limited to 'libgfortran/m4/minloc1.m4')
-rw-r--r-- | libgfortran/m4/minloc1.m4 | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libgfortran/m4/minloc1.m4 b/libgfortran/m4/minloc1.m4 index a224b732592..0c116eb63be 100644 --- a/libgfortran/m4/minloc1.m4 +++ b/libgfortran/m4/minloc1.m4 @@ -43,8 +43,8 @@ include(ifunction.m4)dnl ARRAY_FUNCTION(0, ` atype_name minval; minval = atype_max; - result = 1;', -` if (*src < minval) + result = 0;', +` if (*src < minval || !result) { minval = *src; result = (rtype_name)n + 1; @@ -53,8 +53,8 @@ ARRAY_FUNCTION(0, MASKED_ARRAY_FUNCTION(0, ` atype_name minval; minval = atype_max; - result = 1;', -` if (*msrc && *src < minval) + result = 0;', +` if (*msrc && (*src < minval || !result)) { minval = *src; result = (rtype_name)n + 1; |