https://gcc.gnu.org/g:5afbd5e4cad4706c9e458aee8b1cc429d712f1ee
commit 5afbd5e4cad4706c9e458aee8b1cc429d712f1ee Author: Mikael Morin <[email protected]> Date: Tue Sep 30 17:46:44 2025 +0200 Correction régression coarray/associate_1.f90 Diff: --- gcc/fortran/trans-expr.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/gcc/fortran/trans-expr.cc b/gcc/fortran/trans-expr.cc index 7a647892f870..acd720202752 100644 --- a/gcc/fortran/trans-expr.cc +++ b/gcc/fortran/trans-expr.cc @@ -1264,7 +1264,12 @@ gfc_conv_class_to_class (gfc_se *parmse, gfc_expr *e, gfc_typespec class_ts, gfc_class_array_data_assign (&block, ctree, parmse->expr, false); } else - gfc_copy_descriptor (&block, ctree, parmse->expr); + { + tree src = parmse->expr; + if (GFC_CLASS_TYPE_P (TREE_TYPE (src))) + src = gfc_class_data_get (src); + gfc_copy_descriptor (&block, ctree, src); + } /* Return the data component, except in the case of scalarized array references, where nullification of the cannot occur and so there
