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

commit d92562a1be3a106fcdbe421e34fffa3c5b284677
Author: Mikael Morin <mik...@gcc.gnu.org>
Date:   Tue Jun 3 15:51:25 2025 +0200

    Correction régression finalize_15

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

diff --git a/gcc/fortran/trans-array.cc b/gcc/fortran/trans-array.cc
index 3b511e96224d..57d6ebf5e093 100644
--- a/gcc/fortran/trans-array.cc
+++ b/gcc/fortran/trans-array.cc
@@ -7507,7 +7507,11 @@ gfc_conv_expr_descriptor (gfc_se *se, gfc_expr *expr)
          /* Create a new descriptor if the array doesn't have one.  */
          full = 0;
        }
-      else if (info->ref->u.ar.type == AR_FULL || se->descriptor_only)
+      else if (se->descriptor_only)
+       full = 1;
+      else if (subref_array_target)
+       full = 0;
+      else if (info->ref->u.ar.type == AR_FULL)
        full = 1;
       else if (se->direct_byref)
        full = 0;

Reply via email to