https://gcc.gnu.org/g:74d930450295b96e2303fa6c54b9e9d941105b56

commit 74d930450295b96e2303fa6c54b9e9d941105b56
Author: Mikael Morin <mik...@gcc.gnu.org>
Date:   Thu May 22 11:44:55 2025 +0200

    Correction régression realloc_on_assign_12

Diff:
---
 libgfortran/generated/reshape_c10.c | 1 +
 libgfortran/generated/reshape_c16.c | 1 +
 libgfortran/generated/reshape_c17.c | 1 +
 libgfortran/generated/reshape_c4.c  | 1 +
 libgfortran/generated/reshape_c8.c  | 1 +
 libgfortran/generated/reshape_i16.c | 1 +
 libgfortran/generated/reshape_i4.c  | 1 +
 libgfortran/generated/reshape_i8.c  | 1 +
 libgfortran/generated/reshape_r10.c | 1 +
 libgfortran/generated/reshape_r16.c | 1 +
 libgfortran/generated/reshape_r17.c | 1 +
 libgfortran/generated/reshape_r4.c  | 1 +
 libgfortran/generated/reshape_r8.c  | 1 +
 libgfortran/m4/reshape.m4           | 1 +
 14 files changed, 14 insertions(+)

diff --git a/libgfortran/generated/reshape_c10.c 
b/libgfortran/generated/reshape_c10.c
index b8b2690e76aa..273ceec8cfbe 100644
--- a/libgfortran/generated/reshape_c10.c
+++ b/libgfortran/generated/reshape_c10.c
@@ -120,6 +120,7 @@ reshape_c10 (gfc_array_c10 * const restrict ret,
 
       ret->base_addr = xmalloc (alloc_size);
       ret->dtype.rank = rdim;
+      ret->span = sizeof (GFC_COMPLEX_10);
     }
 
   if (shape_empty)
diff --git a/libgfortran/generated/reshape_c16.c 
b/libgfortran/generated/reshape_c16.c
index 0a5f8556eb7a..e7170605f6b0 100644
--- a/libgfortran/generated/reshape_c16.c
+++ b/libgfortran/generated/reshape_c16.c
@@ -120,6 +120,7 @@ reshape_c16 (gfc_array_c16 * const restrict ret,
 
       ret->base_addr = xmalloc (alloc_size);
       ret->dtype.rank = rdim;
+      ret->span = sizeof (GFC_COMPLEX_16);
     }
 
   if (shape_empty)
diff --git a/libgfortran/generated/reshape_c17.c 
b/libgfortran/generated/reshape_c17.c
index f673342827b6..8103a75d4592 100644
--- a/libgfortran/generated/reshape_c17.c
+++ b/libgfortran/generated/reshape_c17.c
@@ -120,6 +120,7 @@ reshape_c17 (gfc_array_c17 * const restrict ret,
 
       ret->base_addr = xmalloc (alloc_size);
       ret->dtype.rank = rdim;
+      ret->span = sizeof (GFC_COMPLEX_17);
     }
 
   if (shape_empty)
diff --git a/libgfortran/generated/reshape_c4.c 
b/libgfortran/generated/reshape_c4.c
index f7c2b82c1f22..d78e56b2e277 100644
--- a/libgfortran/generated/reshape_c4.c
+++ b/libgfortran/generated/reshape_c4.c
@@ -120,6 +120,7 @@ reshape_c4 (gfc_array_c4 * const restrict ret,
 
       ret->base_addr = xmalloc (alloc_size);
       ret->dtype.rank = rdim;
+      ret->span = sizeof (GFC_COMPLEX_4);
     }
 
   if (shape_empty)
diff --git a/libgfortran/generated/reshape_c8.c 
b/libgfortran/generated/reshape_c8.c
index dd78857a0160..8cfe5b3e0dbb 100644
--- a/libgfortran/generated/reshape_c8.c
+++ b/libgfortran/generated/reshape_c8.c
@@ -120,6 +120,7 @@ reshape_c8 (gfc_array_c8 * const restrict ret,
 
       ret->base_addr = xmalloc (alloc_size);
       ret->dtype.rank = rdim;
+      ret->span = sizeof (GFC_COMPLEX_8);
     }
 
   if (shape_empty)
diff --git a/libgfortran/generated/reshape_i16.c 
b/libgfortran/generated/reshape_i16.c
index a1dbbaae38cd..bc5cdb533373 100644
--- a/libgfortran/generated/reshape_i16.c
+++ b/libgfortran/generated/reshape_i16.c
@@ -120,6 +120,7 @@ reshape_16 (gfc_array_i16 * const restrict ret,
 
       ret->base_addr = xmalloc (alloc_size);
       ret->dtype.rank = rdim;
+      ret->span = sizeof (GFC_INTEGER_16);
     }
 
   if (shape_empty)
diff --git a/libgfortran/generated/reshape_i4.c 
b/libgfortran/generated/reshape_i4.c
index edef7b818812..241dbf562199 100644
--- a/libgfortran/generated/reshape_i4.c
+++ b/libgfortran/generated/reshape_i4.c
@@ -120,6 +120,7 @@ reshape_4 (gfc_array_i4 * const restrict ret,
 
       ret->base_addr = xmalloc (alloc_size);
       ret->dtype.rank = rdim;
+      ret->span = sizeof (GFC_INTEGER_4);
     }
 
   if (shape_empty)
diff --git a/libgfortran/generated/reshape_i8.c 
b/libgfortran/generated/reshape_i8.c
index 632b39d35765..f0f4103ad752 100644
--- a/libgfortran/generated/reshape_i8.c
+++ b/libgfortran/generated/reshape_i8.c
@@ -120,6 +120,7 @@ reshape_8 (gfc_array_i8 * const restrict ret,
 
       ret->base_addr = xmalloc (alloc_size);
       ret->dtype.rank = rdim;
+      ret->span = sizeof (GFC_INTEGER_8);
     }
 
   if (shape_empty)
diff --git a/libgfortran/generated/reshape_r10.c 
b/libgfortran/generated/reshape_r10.c
index ca2b7cfa9d13..35ea34960f56 100644
--- a/libgfortran/generated/reshape_r10.c
+++ b/libgfortran/generated/reshape_r10.c
@@ -120,6 +120,7 @@ reshape_r10 (gfc_array_r10 * const restrict ret,
 
       ret->base_addr = xmalloc (alloc_size);
       ret->dtype.rank = rdim;
+      ret->span = sizeof (GFC_REAL_10);
     }
 
   if (shape_empty)
diff --git a/libgfortran/generated/reshape_r16.c 
b/libgfortran/generated/reshape_r16.c
index d87babcda824..6b1831ae903e 100644
--- a/libgfortran/generated/reshape_r16.c
+++ b/libgfortran/generated/reshape_r16.c
@@ -120,6 +120,7 @@ reshape_r16 (gfc_array_r16 * const restrict ret,
 
       ret->base_addr = xmalloc (alloc_size);
       ret->dtype.rank = rdim;
+      ret->span = sizeof (GFC_REAL_16);
     }
 
   if (shape_empty)
diff --git a/libgfortran/generated/reshape_r17.c 
b/libgfortran/generated/reshape_r17.c
index 888f0a75a89d..c8b8b9488466 100644
--- a/libgfortran/generated/reshape_r17.c
+++ b/libgfortran/generated/reshape_r17.c
@@ -120,6 +120,7 @@ reshape_r17 (gfc_array_r17 * const restrict ret,
 
       ret->base_addr = xmalloc (alloc_size);
       ret->dtype.rank = rdim;
+      ret->span = sizeof (GFC_REAL_17);
     }
 
   if (shape_empty)
diff --git a/libgfortran/generated/reshape_r4.c 
b/libgfortran/generated/reshape_r4.c
index e37f8e78b59f..76f23bdd22aa 100644
--- a/libgfortran/generated/reshape_r4.c
+++ b/libgfortran/generated/reshape_r4.c
@@ -120,6 +120,7 @@ reshape_r4 (gfc_array_r4 * const restrict ret,
 
       ret->base_addr = xmalloc (alloc_size);
       ret->dtype.rank = rdim;
+      ret->span = sizeof (GFC_REAL_4);
     }
 
   if (shape_empty)
diff --git a/libgfortran/generated/reshape_r8.c 
b/libgfortran/generated/reshape_r8.c
index c4e54838f819..9bcd139344c1 100644
--- a/libgfortran/generated/reshape_r8.c
+++ b/libgfortran/generated/reshape_r8.c
@@ -120,6 +120,7 @@ reshape_r8 (gfc_array_r8 * const restrict ret,
 
       ret->base_addr = xmalloc (alloc_size);
       ret->dtype.rank = rdim;
+      ret->span = sizeof (GFC_REAL_8);
     }
 
   if (shape_empty)
diff --git a/libgfortran/m4/reshape.m4 b/libgfortran/m4/reshape.m4
index 3f3f2219ecbc..891f5f8596a9 100644
--- a/libgfortran/m4/reshape.m4
+++ b/libgfortran/m4/reshape.m4
@@ -124,6 +124,7 @@ reshape_'rtype_ccode` ('rtype` * const restrict ret,
 
       ret->base_addr = xmalloc (alloc_size);
       ret->dtype.rank = rdim;
+      ret->span = sizeof ('rtype_name`);
     }
 
   if (shape_empty)

Reply via email to