https://gcc.gnu.org/g:3a7159dfbbde0d314f0d78d0460517ed4fd9fead

commit 3a7159dfbbde0d314f0d78d0460517ed4fd9fead
Author: Mikael Morin <[email protected]>
Date:   Mon Nov 9 23:01:42 2026 +0100

    Correction partielle reduce_1

Diff:
---
 libgfortran/intrinsics/reduce.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libgfortran/intrinsics/reduce.c b/libgfortran/intrinsics/reduce.c
index 9449e144c19a..1a20c0d5ffbf 100644
--- a/libgfortran/intrinsics/reduce.c
+++ b/libgfortran/intrinsics/reduce.c
@@ -154,7 +154,7 @@ reduce (parray *ret,
        {
          ldx = idx0 * str0  + idx2 * str2;
          if (mask_present)
-           maskR = mask->base_addr[ldx];
+           maskR = *((const GFC_LOGICAL_4 *) (((char*) mask->base_addr) + 
ldx));
 
          started = (mask_present && maskR) || !mask_present;
 
@@ -169,7 +169,7 @@ reduce (parray *ret,
                 first element in the reduction.  */
              ldx = idx0 * str0 + idx1 * str1 + idx2 * str2;
              if (mask_present)
-               maskR = mask->base_addr[ldx];
+               maskR = *((const GFC_LOGICAL_4 *) (((char*) mask->base_addr) + 
ldx));
 
              array_ptr = array->base_addr
                          + (size_t)((idx0 * str0 + idx1 * str1

Reply via email to