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

commit ee04e352dd3505aeb054e073dbc5e31358a7c811
Author: Mikael Morin <[email protected]>
Date:   Tue Oct 6 18:27:01 2026 +0200

    Sauvegarde modifs

Diff:
---
 gcc/fortran/expr.cc | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/gcc/fortran/expr.cc b/gcc/fortran/expr.cc
index 32a79d032569..c234f2573bc1 100644
--- a/gcc/fortran/expr.cc
+++ b/gcc/fortran/expr.cc
@@ -6494,6 +6494,10 @@ gfc_is_simply_contiguous (gfc_expr *expr, bool strict, 
bool permit_element)
        && IS_POINTER (part_ref->u.c.component))
       || (!part_ref
          && !sym->attr.contiguous
+         /* Associate names may be associated with a simply contiguous target
+            without having the contiguous attribute set.  Skip them here, and
+            handle them below.  */
+         && !sym->attr.associate_var
          && (IS_POINTER (sym)
              || (sym->ts.type == BT_CLASS
                  && sym->ts.u.derived->attr.is_class

Reply via email to