https://gcc.gnu.org/g:84e8776861eec4f65ed5733f5f5738006f116199

commit 84e8776861eec4f65ed5733f5f5738006f116199
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 1f64a58422ba..6966151014a2 100644
--- a/gcc/fortran/trans-array.cc
+++ b/gcc/fortran/trans-array.cc
@@ -2840,8 +2840,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