aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/resolve.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/fortran/resolve.cc')
-rw-r--r--gcc/fortran/resolve.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/fortran/resolve.cc b/gcc/fortran/resolve.cc
index 166b702..4fe0e72 100644
--- a/gcc/fortran/resolve.cc
+++ b/gcc/fortran/resolve.cc
@@ -16102,6 +16102,11 @@ resolve_symbol (gfc_symbol *sym)
specification_expr = saved_specification_expr;
}
+ /* For a CLASS-valued function with a result variable, affirm that it has
+ been resolved also when looking at the symbol 'sym'. */
+ if (mp_flag && sym->ts.type == BT_CLASS && sym->result->attr.class_ok)
+ sym->attr.class_ok = sym->result->attr.class_ok;
+
if (sym->ts.type == BT_CLASS && sym->attr.class_ok && sym->ts.u.derived
&& CLASS_DATA (sym))
{