summaryrefslogtreecommitdiff
path: root/libgfortran/generated/sum_i1.c
diff options
context:
space:
mode:
Diffstat (limited to 'libgfortran/generated/sum_i1.c')
-rw-r--r--libgfortran/generated/sum_i1.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/libgfortran/generated/sum_i1.c b/libgfortran/generated/sum_i1.c
index 7b03bd05965..737dc2d231f 100644
--- a/libgfortran/generated/sum_i1.c
+++ b/libgfortran/generated/sum_i1.c
@@ -323,18 +323,13 @@ msum_i1 (gfc_array_i1 * const restrict retarray,
{
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)
result += *src;
- }
- *dest = result;
}
+ *dest = result;
}
/* Advance to the next element. */
count[0]++;