https://gcc.gnu.org/g:72c847200e9f7dbbc4e81723d2bcd5e1a70551b4

commit 72c847200e9f7dbbc4e81723d2bcd5e1a70551b4
Author: Mikael Morin <mik...@gcc.gnu.org>
Date:   Mon Sep 22 20:41:51 2025 +0200

    Correction partielle associate_48.f90

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

diff --git a/gcc/fortran/trans-array.cc b/gcc/fortran/trans-array.cc
index fc14c9e1632b..2d2e4ee5b329 100644
--- a/gcc/fortran/trans-array.cc
+++ b/gcc/fortran/trans-array.cc
@@ -3801,9 +3801,6 @@ classify_array_ref (tree array, tree ref_base, gfc_expr 
*expr,
   if (ar && ar->dimen == 0 && ar->codimen != 0)
     return ARS_SCALAR_COARRAY;
 
-  if (is_class_array_ref (ref_base, expr, nullptr))
-    return ARS_CLASS_PTR_ARITH;
-
   if (get_CFI_desc (NULL, expr, nullptr, ar))
     return ARS_CFI_PTR_ARITH;
 
@@ -3812,6 +3809,9 @@ classify_array_ref (tree array, tree ref_base, gfc_expr 
*expr,
          && GFC_DESCRIPTOR_TYPE_P (TREE_TYPE (array))))
     return ARS_SPANNED_PTR_ARITH;
 
+  if (is_class_array_ref (ref_base, expr, nullptr))
+    return ARS_CLASS_PTR_ARITH;
+
   if (tmp_array || non_negative_strides_array_p (array))
     return ARS_SPANNED_PTR_ARITH;

Reply via email to