[gcc(refs/users/mikael/heads/refactor_descriptor_v203.04)] Correction partielle char4-decl2

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

commit 35cd41b4a168fb72f23ef4f023d8e0ec520f375c
Author: Mikael Morin <[email protected]>
Date:   Wed Jul 15 19:34:35 2026 +0200

    Correction partielle char4-decl2

Diff:
---
 gcc/fortran/trans.cc | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/gcc/fortran/trans.cc b/gcc/fortran/trans.cc
index 5b6b053c7930..917c214a4d13 100644
--- a/gcc/fortran/trans.cc
+++ b/gcc/fortran/trans.cc
@@ -848,7 +848,10 @@ gfc_allocate_using_malloc (stmtblock_t * block, tree pointer,
     tmp = build3_loc (input_location, COND_EXPR, TREE_TYPE (tmp), cond,
 		      alt_alloc, tmp);
 
-  gfc_add_modify (block, pointer, fold_convert (TREE_TYPE (pointer), tmp));
+  tree lhs = pointer;
+  if (TREE_CODE (lhs) == NOP_EXPR)
+    lhs = TREE_OPERAND (lhs, 0);
+  gfc_add_modify (block, lhs, fold_convert (TREE_TYPE (lhs), tmp));
 
   /* What to do in case of error.  */
   gfc_start_block (&on_error);
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.