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

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

commit 9601bed512c5f47893febaac66bf439394acd105
Author: Mikael Morin <[email protected]>
Date:   Wed Jul 15 20:06:37 2026 +0200

    Correction volatile7

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

diff --git a/gcc/fortran/trans-expr.cc b/gcc/fortran/trans-expr.cc
index 9e881c7db826..322b15f65bef 100644
--- a/gcc/fortran/trans-expr.cc
+++ b/gcc/fortran/trans-expr.cc
@@ -11308,8 +11308,11 @@ gfc_trans_pointer_assignment (gfc_expr * expr1, gfc_expr * expr2)
 			    build_zero_cst (TREE_TYPE (lse.string_length)));
 	}
 
-      gfc_add_modify (&block, lse.expr,
-		      fold_convert (TREE_TYPE (lse.expr), rse.expr));
+      tree dest = lse.expr;
+      if (TREE_CODE (dest) == NOP_EXPR)
+	dest = TREE_OPERAND (dest, 0);
+      gfc_add_modify (&block, dest,
+		      fold_convert (TREE_TYPE (dest), rse.expr));
 
       if (flag_coarray == GFC_FCOARRAY_LIB)
 	{
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.