summaryrefslogtreecommitdiff
path: root/libgfortran/generated/maxloc1_16_r8.c
diff options
context:
space:
mode:
Diffstat (limited to 'libgfortran/generated/maxloc1_16_r8.c')
-rw-r--r--libgfortran/generated/maxloc1_16_r8.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/libgfortran/generated/maxloc1_16_r8.c b/libgfortran/generated/maxloc1_16_r8.c
index 5d4d9c27c9f..714591ee6b3 100644
--- a/libgfortran/generated/maxloc1_16_r8.c
+++ b/libgfortran/generated/maxloc1_16_r8.c
@@ -354,12 +354,8 @@ mmaxloc1_16_r8 (gfc_array_i16 * const restrict retarray,
GFC_INTEGER_16 result2 = 0;
#endif
result = 0;
- if (len <= 0)
- *dest = 0;
- else
+ for (n = 0; n < len; n++, src += delta, msrc += mdelta)
{
- for (n = 0; n < len; n++, src += delta, msrc += mdelta)
- {
if (*msrc)
{
@@ -387,9 +383,8 @@ mmaxloc1_16_r8 (gfc_array_i16 * const restrict retarray,
maxval = *src;
result = (GFC_INTEGER_16)n + 1;
}
- }
- *dest = result;
}
+ *dest = result;
}
/* Advance to the next element. */
count[0]++;