https://gcc.gnu.org/g:ded51c2bed6f804589de7f996b84ffbe7b27cc43

commit ded51c2bed6f804589de7f996b84ffbe7b27cc43
Author: Mikael Morin <[email protected]>
Date:   Tue Oct 6 14:02:21 2026 +0200

    Propagation contiguous aux variables polymorphes.

Diff:
---
 gcc/fortran/resolve.cc | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/gcc/fortran/resolve.cc b/gcc/fortran/resolve.cc
index 67eaea64c9bc..c19bc14cf1fc 100644
--- a/gcc/fortran/resolve.cc
+++ b/gcc/fortran/resolve.cc
@@ -11091,8 +11091,9 @@ 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 is a contiguous pointer, so is the associate variable.  */
-  if (gfc_expr_attr (target).pointer && gfc_expr_attr (target).contiguous)
+  /* If the target has the contiguous attribute, so has the associate
+     variable.  */
+  if (gfc_expr_attr (target).contiguous)
     sym->attr.contiguous = 1;
 }

Reply via email to