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

commit fa108d6ba5262ddac74bd2e391fba79b6e5adf9a
Author: Mikael Morin <mik...@gcc.gnu.org>
Date:   Thu Jun 5 10:45:19 2025 +0200

    Modif span/elem_len descripteurs de sous-références.

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 5b18df0e9679..486b5d280986 100644
--- a/gcc/fortran/trans-array.cc
+++ b/gcc/fortran/trans-array.cc
@@ -7819,7 +7819,8 @@ gfc_conv_expr_descriptor (gfc_se *se, gfc_expr *expr)
       else
        {
          /* Otherwise make a new one.  */
-         if (expr->ts.type == BT_CHARACTER)
+         if (expr->ts.type == BT_CHARACTER
+             || subref_array_target)
            parmtype = gfc_typenode_for_spec (&expr->ts);
          else
            parmtype = gfc_get_element_type (TREE_TYPE (desc));

Reply via email to