https://gcc.gnu.org/g:bd1ea7df80a4e09aa350c4921570d9d8889c2bd4

commit bd1ea7df80a4e09aa350c4921570d9d8889c2bd4
Author: Mikael Morin <[email protected]>
Date:   Thu Oct 2 10:26:52 2025 +0200

    Correction regression deferred_character_39.f90

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

diff --git a/gcc/fortran/trans-descriptor.cc b/gcc/fortran/trans-descriptor.cc
index 565ddbf23e68..920d97e29999 100644
--- a/gcc/fortran/trans-descriptor.cc
+++ b/gcc/fortran/trans-descriptor.cc
@@ -2239,7 +2239,8 @@ gfc_set_descriptor (stmtblock_t *block, tree dest, tree 
src, gfc_expr *src_expr,
   if (src_expr->ts.type == BT_CHARACTER
       && src_expr->ts.deferred
       && src_expr->ts.u.cl->backend_decl
-      && VAR_P (src_expr->ts.u.cl->backend_decl))
+      && VAR_P (src_expr->ts.u.cl->backend_decl)
+      && !GFC_BYTES_STRIDES_ARRAY_TYPE_P (TREE_TYPE (src)))
     {
       tree base_type = TREE_TYPE (base);
       base = fold_build2_loc (input_location, MULT_EXPR, base_type, base,

Reply via email to