https://gcc.gnu.org/g:30e67f9e04adcd455f4e8e301941c053989e11e7

commit 30e67f9e04adcd455f4e8e301941c053989e11e7
Author: Mikael Morin <mik...@gcc.gnu.org>
Date:   Tue Sep 23 19:25:38 2025 +0200

    Correction partielle unlimited_polymorphic_17.f90

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

diff --git a/gcc/fortran/trans-array.cc b/gcc/fortran/trans-array.cc
index 22db090d62d8..bb0394f52bba 100644
--- a/gcc/fortran/trans-array.cc
+++ b/gcc/fortran/trans-array.cc
@@ -3776,6 +3776,9 @@ non_negative_strides_array_p (tree expr)
   if (!GFC_ARRAY_TYPE_P (type))
     return false;
 
+  if (INDIRECT_REF_P (expr))
+    expr = TREE_OPERAND (expr, 0);
+
   /* If the array was originally a dummy with a descriptor, strides can be
      negative.  */
   if (DECL_P (expr)

Reply via email to