summaryrefslogtreecommitdiff
path: root/libgfortran/generated/maxval_i2.c
diff options
context:
space:
mode:
Diffstat (limited to 'libgfortran/generated/maxval_i2.c')
-rw-r--r--libgfortran/generated/maxval_i2.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/libgfortran/generated/maxval_i2.c b/libgfortran/generated/maxval_i2.c
index eb3d767e31a..959ad434261 100644
--- a/libgfortran/generated/maxval_i2.c
+++ b/libgfortran/generated/maxval_i2.c
@@ -344,12 +344,8 @@ mmaxval_i2 (gfc_array_i2 * const restrict retarray,
#if defined (GFC_INTEGER_2_QUIET_NAN)
int non_empty_p = 0;
#endif
- if (len <= 0)
- *dest = (-GFC_INTEGER_2_HUGE-1);
- else
+ for (n = 0; n < len; n++, src += delta, msrc += mdelta)
{
- for (n = 0; n < len; n++, src += delta, msrc += mdelta)
- {
#if defined (GFC_INTEGER_2_INFINITY) || defined (GFC_INTEGER_2_QUIET_NAN)
if (*msrc)
@@ -374,9 +370,8 @@ mmaxval_i2 (gfc_array_i2 * const restrict retarray,
#endif
if (*msrc && *src > result)
result = *src;
- }
- *dest = result;
}
+ *dest = result;
}
/* Advance to the next element. */
count[0]++;