https://gcc.gnu.org/g:9598e3e6bdff5fbc35e4c4a00d1c1b45bf189100
commit 9598e3e6bdff5fbc35e4c4a00d1c1b45bf189100 Author: Mikael Morin <[email protected]> Date: Sun Sep 28 12:34:27 2025 +0200 Correction régression associate_17.f90 Diff: --- gcc/fortran/trans-types.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/gcc/fortran/trans-types.cc b/gcc/fortran/trans-types.cc index 21bb9c524341..9ebda98744d7 100644 --- a/gcc/fortran/trans-types.cc +++ b/gcc/fortran/trans-types.cc @@ -2485,8 +2485,13 @@ gfc_sym_type (gfc_symbol * sym, bool is_bind_c) : GFC_ARRAY_POINTER; else if (sym->attr.allocatable) akind = GFC_ARRAY_ALLOCATABLE; + + bool contiguous = sym->attr.contiguous + || (sym->assoc + && !sym->assoc->dangling + && !sym->assoc->variable); type = gfc_build_array_type (type, sym->as, akind, restricted, - sym->attr.contiguous, sym->as->corank); + contiguous, sym->as->corank); } } else
