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

commit a8068fdd9ea8f2a1355a422b4ca5a4ea1869c608
Author: Mikael Morin <mik...@gcc.gnu.org>
Date:   Fri May 2 15:47:25 2025 +0200

    Correction régression ISO_Fortran_binding_4

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

diff --git a/gcc/fortran/trans-descriptor.cc b/gcc/fortran/trans-descriptor.cc
index dff7bbb87d83..f5401dc39294 100644
--- a/gcc/fortran/trans-descriptor.cc
+++ b/gcc/fortran/trans-descriptor.cc
@@ -2843,7 +2843,9 @@ gfc_set_gfc_from_cfi (stmtblock_t *unconditional_block,
       tmp = fold_build2_loc (input_location, MULT_EXPR, TREE_TYPE (tmp2),
                             tmp2, tmp);
       tmp = build3_loc (input_location, COND_EXPR, gfc_array_index_type, cond,
-                       gfc_get_cfi_desc_elem_len (cfi), tmp);
+                       fold_convert (gfc_array_index_type,
+                                     gfc_get_cfi_desc_elem_len (cfi)),
+                       tmp);
     }
   else
     {

Reply via email to