summaryrefslogtreecommitdiff
path: root/libgfortran/generated/product_i1.c
diff options
context:
space:
mode:
Diffstat (limited to 'libgfortran/generated/product_i1.c')
-rw-r--r--libgfortran/generated/product_i1.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/libgfortran/generated/product_i1.c b/libgfortran/generated/product_i1.c
index ff8e76a7b07..9ea168741aa 100644
--- a/libgfortran/generated/product_i1.c
+++ b/libgfortran/generated/product_i1.c
@@ -323,18 +323,13 @@ mproduct_i1 (gfc_array_i1 * const restrict retarray,
{
result = 1;
- if (len <= 0)
- *dest = 1;
- 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]++;