https://gcc.gnu.org/g:0c0615355ae85634b1b06a3eac071084f0913862

commit 0c0615355ae85634b1b06a3eac071084f0913862
Author: Mikael Morin <[email protected]>
Date:   Wed Oct 8 18:20:04 2025 +0200

    Correction partielle régression pr117797.f90

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

diff --git a/gcc/fortran/trans-descriptor.cc b/gcc/fortran/trans-descriptor.cc
index 039af2190d0c..f6e79797de4a 100644
--- a/gcc/fortran/trans-descriptor.cc
+++ b/gcc/fortran/trans-descriptor.cc
@@ -2241,6 +2241,9 @@ gfc_set_descriptor (stmtblock_t *block, tree dest, tree 
src, gfc_expr *src_expr,
          if (TREE_CODE (tmp2) == INDIRECT_REF
              && DECL_P (TREE_OPERAND (tmp2, 0)))
            tmp2 = TREE_OPERAND (tmp2, 0);
+         if (TREE_CODE (tmp2) == COMPONENT_REF
+             && GFC_CLASS_TYPE_P (TREE_TYPE (TREE_OPERAND (tmp2, 0))))
+           tmp2 = TREE_OPERAND (tmp2, 0);
          if (DECL_P (tmp2)
              && DECL_LANG_SPECIFIC (tmp2)
              && GFC_DECL_SAVED_DESCRIPTOR (tmp2))

Reply via email to