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

commit dbfe8c931166552bb440060e860a405b30f825b9
Author: Mikael Morin <mik...@gcc.gnu.org>
Date:   Tue Apr 22 22:14:47 2025 +0200

    Correction régression dependency_50

Diff:
---
 gcc/fortran/trans-array.cc | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/gcc/fortran/trans-array.cc b/gcc/fortran/trans-array.cc
index 16c4e9022c22..948786e488db 100644
--- a/gcc/fortran/trans-array.cc
+++ b/gcc/fortran/trans-array.cc
@@ -2845,8 +2845,7 @@ gfc_add_loop_ss_code (gfc_loopinfo * loop, gfc_ss * ss, 
bool subscript,
                                               ? &CLASS_DATA (ss_info->expr)->ts
                                               : &ss_info->expr->ts);
            if (ss_info->expr->ts.type == BT_CHARACTER
-               && ss_info->expr->ts.u.cl->length
-               && ss_info->expr->ts.u.cl->length->expr_type == EXPR_CONSTANT)
+               && gfc_is_constant_expr (ss_info->expr))
              type = build_pointer_type (type);
            tree spacing = TYPE_SIZE_UNIT (type);
            if (spacing == NULL_TREE)

Reply via email to