aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/resolve.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/fortran/resolve.c')
-rw-r--r--gcc/fortran/resolve.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c
index ddb6d67..f2e6b9d 100644
--- a/gcc/fortran/resolve.c
+++ b/gcc/fortran/resolve.c
@@ -8325,6 +8325,13 @@ resolve_assoc_var (gfc_symbol* sym, bool resolve_target)
has no corank. */
sym->as->corank = 0;
}
+
+ /* Mark this as an associate variable. */
+ sym->attr.associate_var = 1;
+
+ /* If the target is a good class object, so is the associate variable. */
+ if (sym->ts.type == BT_CLASS && gfc_expr_attr (target).class_ok)
+ sym->attr.class_ok = 1;
}