[gcc(refs/users/mikael/heads/refactor_descriptor_v206.01)] Ajout assertion type pointeur

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

commit 7112a8a7cb05231f75adf79364a6b2edad5aedc8
Author: Mikael Morin <[email protected]>
Date:   Tue Aug 18 16:22:23 2026 +0200

    Ajout assertion type pointeur

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

diff --git a/gcc/fortran/trans-descriptor.cc b/gcc/fortran/trans-descriptor.cc
index f6af3d2a8cfc..7d3a6242f56d 100644
--- a/gcc/fortran/trans-descriptor.cc
+++ b/gcc/fortran/trans-descriptor.cc
@@ -864,10 +864,8 @@ gfc_set_descriptor_from_scalar (stmtblock_t *block, tree descr, tree scalar,
   if (flag_coarray == GFC_FCOARRAY_LIB && caf_token)
     gfc_conv_descriptor_token_set (block, descr, caf_token);
 
-  tree scalar_type = TREE_TYPE (scalar);
-  tree etype = POINTER_TYPE_P (scalar_type)
-	       ? TREE_TYPE (scalar_type)
-	       : scalar_type;
+  gcc_assert (POINTER_TYPE_P (TREE_TYPE (scalar)));
+  tree etype = TREE_TYPE (TREE_TYPE (scalar));
   gfc_conv_descriptor_dtype_set (block, descr,
 				 gfc_get_dtype_rank_type (0, etype));
   gfc_copy_coarray_desc_part (block, descr, scalar);
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.