https://gcc.gnu.org/g:77bf25f1e0a77b88d6e8f1b646d8052066b7218d

commit 77bf25f1e0a77b88d6e8f1b646d8052066b7218d
Author: Mikael Morin <[email protected]>
Date:   Tue Sep 9 18:16:40 2025 +0200

    Correction spread.m4

Diff:
---
 libgfortran/m4/spread.m4 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libgfortran/m4/spread.m4 b/libgfortran/m4/spread.m4
index be5fd4a3f074..bff3a6a62364 100644
--- a/libgfortran/m4/spread.m4
+++ b/libgfortran/m4/spread.m4
@@ -78,7 +78,7 @@ spread_'rtype_code` ('rtype` *ret, const 'rtype` *source,
       ret->dtype.rank = rrank;
 
       dim = 0;
-      rs = GFC_DESCRIPTOR_SIZE(ret);
+      rs = 1;
       for (n = 0; n < rrank; n++)
        {
          stride = rs;
@@ -93,7 +93,7 @@ spread_'rtype_code` ('rtype` *ret, const 'rtype` *source,
              count[dim] = 0;
              extent[dim] = GFC_DESCRIPTOR_EXTENT(source,dim);
              sstride[dim] = GFC_DESCRIPTOR_STRIDE_BYTES(source,dim);
-             rstride[dim] = rs;
+             rstride[dim] = rs * sizeof ('rtype_name`);
 
              ub = extent[dim] - 1;
              rs *= extent[dim];

Reply via email to