aboutsummaryrefslogtreecommitdiff
path: root/libgfortran/generated/product_i2.c
diff options
context:
space:
mode:
Diffstat (limited to 'libgfortran/generated/product_i2.c')
-rw-r--r--libgfortran/generated/product_i2.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/libgfortran/generated/product_i2.c b/libgfortran/generated/product_i2.c
index 1063d6acf98..1785cbdb580 100644
--- a/libgfortran/generated/product_i2.c
+++ b/libgfortran/generated/product_i2.c
@@ -323,18 +323,13 @@ mproduct_i2 (gfc_array_i2 * 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]++;