https://gcc.gnu.org/g:3d49da4ededbd786b05f858baaee93db5d7406ab

commit 3d49da4ededbd786b05f858baaee93db5d7406ab
Author: Mikael Morin <[email protected]>
Date:   Wed Sep 16 17:06:07 2026 +0200

    Sauvegarde modifs

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

diff --git a/gcc/fortran/trans-expr.cc b/gcc/fortran/trans-expr.cc
index dc2888b896ca..c07108cbaab1 100644
--- a/gcc/fortran/trans-expr.cc
+++ b/gcc/fortran/trans-expr.cc
@@ -11926,8 +11926,9 @@ gfc_trans_pointer_assignment (gfc_expr * expr1, 
gfc_expr * expr2)
          gcc_assert (remap->u.ar.dimen == expr1->rank);
 
          /* Always set dtype.  */
-         gfc_conv_descriptor_dtype_set (&block, desc,
-                                        gfc_get_dtype (TREE_TYPE (desc)));
+         if (expr1->ts.type != BT_CLASS)
+           gfc_conv_descriptor_dtype_set (&block, desc,
+                                          gfc_get_dtype (TREE_TYPE (desc)));
 
          /* For unlimited polymorphic LHS use elem_len from RHS.  */
          if (UNLIMITED_POLY (expr1) && expr2->ts.type != BT_CLASS)

Reply via email to