https://gcc.gnu.org/g:59e0474c5f539c2d1b4bd543873bba920a3c2a67
commit 59e0474c5f539c2d1b4bd543873bba920a3c2a67 Author: Mikael Morin <[email protected]> Date: Mon Sep 29 13:29:29 2025 +0200 Correction partielle coarray/dummy_3.f90 Diff: --- gcc/fortran/trans-array.cc | 3 ++- gcc/fortran/trans-types.cc | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/gcc/fortran/trans-array.cc b/gcc/fortran/trans-array.cc index ade95e34896e..51077cf11656 100644 --- a/gcc/fortran/trans-array.cc +++ b/gcc/fortran/trans-array.cc @@ -3887,7 +3887,8 @@ classify_array_ref (gfc_se *se, tree array, tree ref_base, gfc_expr *expr, return ARS_CLASS_PTR_ARITH; } } - else if (is_class_array_ref (se, ref_base, expr, ar, nullptr)) + else if (!GFC_BYTES_STRIDES_ARRAY_TYPE_P (TREE_TYPE (array)) + && is_class_array_ref (se, ref_base, expr, ar, nullptr)) return ARS_CLASS_PTR_ARITH; if (GFC_BYTES_STRIDES_ARRAY_TYPE_P (TREE_TYPE (array))) diff --git a/gcc/fortran/trans-types.cc b/gcc/fortran/trans-types.cc index c6c7ad66699b..93591def1201 100644 --- a/gcc/fortran/trans-types.cc +++ b/gcc/fortran/trans-types.cc @@ -1865,6 +1865,7 @@ gfc_get_nodesc_array_type (tree etype, gfc_array_spec * as, gfc_packed packed, GFC_TYPE_ARRAY_RANK (type) = as->rank; GFC_TYPE_ARRAY_CORANK (type) = as->corank; GFC_TYPE_ARRAY_DTYPE (type) = NULL_TREE; + GFC_BYTES_STRIDES_ARRAY_TYPE_P (type) = packed == PACKED_NO; range = build_range_type (gfc_array_index_type, gfc_index_zero_node, NULL_TREE); /* TODO: use main type if it is unbounded. */
