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

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

commit d9a8989264d971f80767f4001d47ebc14ae6852b
Author: Mikael Morin <[email protected]>
Date:   Tue Jul 14 20:33:34 2026 +0200

    Correction pr100949

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

diff --git a/gcc/fortran/trans-stmt.cc b/gcc/fortran/trans-stmt.cc
index 5cffe356f655..f13bb82b26a7 100644
--- a/gcc/fortran/trans-stmt.cc
+++ b/gcc/fortran/trans-stmt.cc
@@ -7503,6 +7503,8 @@ gfc_trans_allocate (gfc_code * code, gfc_omp_namelist *omp_allocate)
 	 the trans_assignment below will set the vptr.  */
       if (al_vptr != NULL_TREE && (!code->expr3 || code->expr3->mold))
 	{
+	  if (TREE_CODE (al_vptr) == NOP_EXPR)
+	    al_vptr = TREE_OPERAND (al_vptr, 0);
 	  if (expr3_vptr != NULL_TREE)
 	    /* The vtab is already known, so just assign it.  */
 	    gfc_add_modify (&block, al_vptr,
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.