https://gcc.gnu.org/g:fffae2c104e014e649d9ffdfa0b29247bbb2e3c5
commit fffae2c104e014e649d9ffdfa0b29247bbb2e3c5 Author: Mikael Morin <[email protected]> Date: Tue Oct 6 17:52:58 2026 +0200 Revert partiel "fortran: Fix simply contiguous for polymorphic arrays [PR127613]" This reverts commit 35f1e51768d11cc0b5c29d86a3802f2fc06753a9. Diff: --- gcc/fortran/resolve.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/gcc/fortran/resolve.cc b/gcc/fortran/resolve.cc index c19bc14cf1fc..67eaea64c9bc 100644 --- a/gcc/fortran/resolve.cc +++ b/gcc/fortran/resolve.cc @@ -11091,9 +11091,8 @@ resolve_assoc_var (gfc_symbol* sym, bool resolve_target) if (sym->ts.type == BT_CLASS && gfc_expr_attr (target).class_ok) sym->attr.class_ok = 1; - /* If the target has the contiguous attribute, so has the associate - variable. */ - if (gfc_expr_attr (target).contiguous) + /* If the target is a contiguous pointer, so is the associate variable. */ + if (gfc_expr_attr (target).pointer && gfc_expr_attr (target).contiguous) sym->attr.contiguous = 1; }
