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

commit 3b477ace679010885a52c453cf8b58466a0a9f96
Author: Mikael Morin <[email protected]>
Date:   Wed Oct 1 11:57:13 2025 +0200

    Correction régression implied_do_2.f90

Diff:
---
 gcc/fortran/trans-array.cc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/gcc/fortran/trans-array.cc b/gcc/fortran/trans-array.cc
index 141ce2274a6c..0a3e8c5bcfc8 100644
--- a/gcc/fortran/trans-array.cc
+++ b/gcc/fortran/trans-array.cc
@@ -3226,7 +3226,8 @@ gfc_conv_array_stride_bytes (tree descriptor, int dim)
 
   tree element_type = gfc_get_element_type (type);
   tree elt_size = TYPE_SIZE_UNIT (element_type);
-  if (elt_size == NULL_TREE)
+  if (elt_size == NULL_TREE
+      || TREE_CODE (elt_size) != INTEGER_CST)
     elt_size = gfc_conv_descriptor_elem_len_get (descriptor);
   elt_size = fold_convert_loc (input_location, gfc_array_index_type, elt_size);

Reply via email to