https://gcc.gnu.org/g:a3a358fe6f0197b0892a78e1ddb968e39f9440cb
commit a3a358fe6f0197b0892a78e1ddb968e39f9440cb Author: Mikael Morin <[email protected]> Date: Tue Nov 10 10:29:16 2026 +0100 Correction partielle reduce_1 Diff: --- libgfortran/intrinsics/reduce.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libgfortran/intrinsics/reduce.c b/libgfortran/intrinsics/reduce.c index 892ac8f7e470..04224022e724 100644 --- a/libgfortran/intrinsics/reduce.c +++ b/libgfortran/intrinsics/reduce.c @@ -51,7 +51,7 @@ reduce (parray *ret, void *res; index_type ext0, ext1, ext2; index_type str0, str1, str2; - index_type mstr0, mstr1, mstr2; + index_type mstr0 = 0, mstr1, mstr2; index_type idx0, idx1, idx2; index_type dimen, dimen_m1, ext, str; bool started; @@ -95,7 +95,8 @@ reduce (parray *ret, painless by the use of pointer arithmetic throughout. */ ext0 = ext1 = ext2 = 1; str0 = str1 = str2 = elem_len; - mstr0 = mstr1 = mstr2 = GFC_DESCRIPTOR_STRIDE_BYTES (mask, 0); + if (mask_present) + mstr0 = mstr1 = mstr2 = GFC_DESCRIPTOR_STRIDE_BYTES (mask, 0); scalar_result = (!dim_present && array_rank > 1) || array_rank == 1;
