From dc8af1a7b28e695b8145cd2e55494b973f76851c Mon Sep 17 00:00:00 2001 From: Mikael Morin Date: Fri, 17 Oct 2025 14:52:38 +0200 Subject: [PATCH] =?UTF-8?q?Correction=20r=C3=A9gression=20nested=5Farray?= =?UTF-8?q?=5Fconstructor=5F3.f90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gcc/fortran/trans-descriptor.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/fortran/trans-descriptor.cc b/gcc/fortran/trans-descriptor.cc index 5ab2b98cb059..6ef9fa8145a2 100644 --- a/gcc/fortran/trans-descriptor.cc +++ b/gcc/fortran/trans-descriptor.cc @@ -2328,12 +2328,11 @@ gfc_set_descriptor (stmtblock_t *block, tree dest, tree src, gfc_expr *src_expr, } else if (src_expr->rank != -1 && src_expr->ts.type == BT_CHARACTER - && src_expr->ts.deferred && !element_size_known (dest)) { bool bytes_strides = GFC_BYTES_STRIDES_ARRAY_TYPE_P (TREE_TYPE (dest)); dtype = get_dtype_rank_type_size (src_expr->rank, BT_CHARACTER, - bytes_strides, NULL_TREE); + bytes_strides, ss->info->string_length); } else dtype = gfc_get_dtype (TREE_TYPE (dest)); @@ -2343,6 +2342,7 @@ gfc_set_descriptor (stmtblock_t *block, tree dest, tree src, gfc_expr *src_expr, gfc_conv_descriptor_elem_len_set (block, dest, span); else if (src_expr->rank != -1 && src_expr->ts.type == BT_CHARACTER + && ss->info->string_length == NULL_TREE && !element_size_known (dest)) { tree src_desc = src;