https://gcc.gnu.org/g:91a3eb9e99f980e9f83f532b50e0656a202532ee

commit 91a3eb9e99f980e9f83f532b50e0656a202532ee
Author: Mikael Morin <mik...@gcc.gnu.org>
Date:   Sun May 18 11:20:40 2025 +0200

    Correction régression class_67

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

diff --git a/gcc/fortran/trans-expr.cc b/gcc/fortran/trans-expr.cc
index 58e5382b72c6..c4666a526abc 100644
--- a/gcc/fortran/trans-expr.cc
+++ b/gcc/fortran/trans-expr.cc
@@ -1281,7 +1281,9 @@ gfc_conv_class_to_class (gfc_se *parmse, gfc_expr *e, 
gfc_typespec class_ts,
     }
 
   if ((ref == NULL || class_ref == ref)
-      && !(gfc_is_class_array_function (e) && parmse->class_vptr != NULL_TREE)
+      && !(gfc_is_class_array_function (e)
+          && (parmse->class_vptr != NULL_TREE
+              || parmse->class_container != NULL_TREE))
       && (!class_ts.u.derived->components->as
          || class_ts.u.derived->components->as->rank != -1))
     return;

Reply via email to