[gcc(refs/users/mikael/heads/refactor_descriptor_v206.01)] Revert "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:bf1f993de8b2cbeb4e28d50a29546a98130baf9b

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

    Revert "Ajout assertion type pointeur"
    
    This reverts commit 7112a8a7cb05231f75adf79364a6b2edad5aedc8.

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

diff --git a/gcc/fortran/trans-descriptor.cc b/gcc/fortran/trans-descriptor.cc
index 7d3a6242f56d..f6af3d2a8cfc 100644
--- a/gcc/fortran/trans-descriptor.cc
+++ b/gcc/fortran/trans-descriptor.cc
@@ -864,8 +864,10 @@ 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);
 
-  gcc_assert (POINTER_TYPE_P (TREE_TYPE (scalar)));
-  tree etype = TREE_TYPE (TREE_TYPE (scalar));
+  tree scalar_type = TREE_TYPE (scalar);
+  tree etype = POINTER_TYPE_P (scalar_type)
+	       ? TREE_TYPE (scalar_type)
+	       : scalar_type;
   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.