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

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

commit 49415dd21bb3319bf21635b75ced520239b7c087
Author: Mikael Morin <[email protected]>
Date:   Wed Jul 15 20:19:17 2026 +0200

    Correction class_optional_2

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

diff --git a/gcc/fortran/trans-expr.cc b/gcc/fortran/trans-expr.cc
index 322b15f65bef..1df323aae3d0 100644
--- a/gcc/fortran/trans-expr.cc
+++ b/gcc/fortran/trans-expr.cc
@@ -1556,10 +1556,8 @@ gfc_conv_class_to_class (gfc_se *parmse, gfc_expr *e, gfc_typespec class_ts,
       else
 	{
 	  gfc_init_block (&block);
-
-	  tmp2 = gfc_conv_descriptor_data_get (gfc_class_data_get (var));
-	  gfc_add_modify (&block, tmp2, fold_convert (TREE_TYPE (tmp2),
-						      null_pointer_node));
+	  gfc_conv_descriptor_data_set (&block, gfc_class_data_get (var),
+					null_pointer_node);
 	  tmp2 = gfc_finish_block (&block);
 	}
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.