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

commit c9fca302924e9136ce035c2c6305abb4b5d9b2a1
Author: Mikael Morin <mik...@gcc.gnu.org>
Date:   Wed Apr 30 13:46:50 2025 +0200

    Correction régression array_temporaries_3

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

diff --git a/gcc/fortran/trans-array.cc b/gcc/fortran/trans-array.cc
index 994809c60ad1..85711ac6c341 100644
--- a/gcc/fortran/trans-array.cc
+++ b/gcc/fortran/trans-array.cc
@@ -2831,7 +2831,8 @@ gfc_add_loop_ss_code (gfc_loopinfo * loop, gfc_ss * ss, 
bool subscript,
                    && ss_info->expr->ts.type != BT_CLASS)
                  {
                    tree type = gfc_typenode_for_spec (&ss_info->expr->ts);
-                   if (TYPE_SIZE_UNIT (type) == NULL_TREE)
+                   if (TYPE_SIZE_UNIT (type) == NULL_TREE
+                       || !INTEGER_CST_P (TYPE_SIZE_UNIT (type)))
                      {
                        for (n = 0; n < ss_info->expr->rank; n++)
                          {

Reply via email to