[gcc(refs/users/mikael/heads/refactor_descriptor_v203.04)] Correction pr71688.f90

Mikael Morin via Gcc-cvs <[email protected]>
Newsgroups gmane.comp.gcc.cvs
Message-ID <[email protected]>
https://gcc.gnu.org/g:3177b3634456c16a1726804980ecd6841c624e54

commit 3177b3634456c16a1726804980ecd6841c624e54
Author: Mikael Morin <[email protected]>
Date:   Tue Jul 14 18:11:09 2026 +0200

    Correction pr71688.f90

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

diff --git a/gcc/fortran/trans-expr.cc b/gcc/fortran/trans-expr.cc
index df029bfd1140..7bc3875b9880 100644
--- a/gcc/fortran/trans-expr.cc
+++ b/gcc/fortran/trans-expr.cc
@@ -11985,6 +11985,9 @@ gfc_trans_scalar_assign (gfc_se *lse, gfc_se *rse, gfc_typespec ts,
 	    }
 	  if (GFC_DESCRIPTOR_TYPE_P (TREE_TYPE (lse->expr)))
 	    lse->expr = gfc_conv_array_data (lse->expr);
+	  /* We create those for scalar coarrays.  */
+	  else if (TREE_CODE (lse->expr) == NOP_EXPR)
+	    lse->expr = TREE_OPERAND (lse->expr, 0);
 	  if (flag_coarray == GFC_FCOARRAY_SINGLE && assoc_assign
 	      && !POINTER_TYPE_P (TREE_TYPE (rse->expr)))
 	    rse->expr = gfc_build_addr_expr (NULL_TREE, rse->expr);
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.