https://gcc.gnu.org/g:fcec5f1f9915e8e57728f454306820ac736e983c

commit fcec5f1f9915e8e57728f454306820ac736e983c
Author: Mikael Morin <[email protected]>
Date:   Sat Sep 27 21:58:52 2025 +0200

    Correction régression inquire_14.f90

Diff:
---
 gcc/fortran/trans-array.cc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/gcc/fortran/trans-array.cc b/gcc/fortran/trans-array.cc
index 751f4fd96e03..4b7e0fab8808 100644
--- a/gcc/fortran/trans-array.cc
+++ b/gcc/fortran/trans-array.cc
@@ -3224,6 +3224,7 @@ gfc_conv_array_stride_bytes (tree descriptor, int dim)
   tree elt_size = TYPE_SIZE_UNIT (element_type);
   if (elt_size == NULL_TREE)
     elt_size = gfc_conv_descriptor_elem_len_get (descriptor);
+  elt_size = fold_convert_loc (input_location, gfc_array_index_type, elt_size);
 
   return fold_build2_loc (input_location, MULT_EXPR, gfc_array_index_type,
                          raw_stride, elt_size);

Reply via email to