https://gcc.gnu.org/g:0d733c8fd019d8de0e6467f5525f0705f9ceef2a

commit 0d733c8fd019d8de0e6467f5525f0705f9ceef2a
Author: Mikael Morin <mik...@gcc.gnu.org>
Date:   Tue Sep 9 15:54:32 2025 +0200

    Correction matmul.m4

Diff:
---
 libgfortran/m4/matmul_internal.m4 | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/libgfortran/m4/matmul_internal.m4 
b/libgfortran/m4/matmul_internal.m4
index 2343cd6cc837..b5fe0c1213f3 100644
--- a/libgfortran/m4/matmul_internal.m4
+++ b/libgfortran/m4/matmul_internal.m4
@@ -106,12 +106,12 @@ sinclude(`matmul_asm_'rtype_code`.m4')dnl
       rystride = GFC_DESCRIPTOR_STRIDE(retarray,1);
     }
 
-
   if (GFC_DESCRIPTOR_RANK (a) == 1)
     {
       /* Treat it as a a row matrix A[1,count]. */
       axstride = GFC_DESCRIPTOR_STRIDE(a,0);
       aystride = 1;
+      aystride_bytes = sizeof ('rtype_name`);
 
       xcount = 1;
       count = GFC_DESCRIPTOR_EXTENT(a,0);
@@ -120,6 +120,7 @@ sinclude(`matmul_asm_'rtype_code`.m4')dnl
     {
       axstride = GFC_DESCRIPTOR_STRIDE(a,0);
       aystride = GFC_DESCRIPTOR_STRIDE(a,1);
+      aystride_bytes = GFC_DESCRIPTOR_STRIDE_BYTES(a,1);
 
       count = GFC_DESCRIPTOR_EXTENT(a,1);
       xcount = GFC_DESCRIPTOR_EXTENT(a,0);
@@ -148,6 +149,7 @@ sinclude(`matmul_asm_'rtype_code`.m4')dnl
     {
       bxstride = GFC_DESCRIPTOR_STRIDE(b,0);
       bystride = GFC_DESCRIPTOR_STRIDE(b,1);
+      bystride_bytes = GFC_DESCRIPTOR_STRIDE_BYTES(b,1);
       ycount = GFC_DESCRIPTOR_EXTENT(b,1);
     }
 
@@ -193,9 +195,6 @@ sinclude(`matmul_asm_'rtype_code`.m4')dnl
        }
     }
 
-  aystride_bytes = GFC_DESCRIPTOR_STRIDE_BYTES(a,1);
-  bystride_bytes = GFC_DESCRIPTOR_STRIDE_BYTES(b,1);
-
   if (rxstride == 1 && axstride == 1 && bxstride == 1
       && GFC_DESCRIPTOR_RANK (b) != 1)
     {

Reply via email to