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.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c
index d682b22..75a6ca3 100644
--- a/gcc/fortran/resolve.c
+++ b/gcc/fortran/resolve.c
@@ -6043,8 +6043,17 @@ resolve_symbol (gfc_symbol * sym)
on COMMON blocks. */
check_constant = sym->attr.in_common && !sym->attr.pointer;
+
+ /* Set the formal_arg_flag so that check_conflict will not throw
+ an error for host associated variables in the specification
+ expression for an array_valued function. */
+ if (sym->attr.function && sym->as)
+ formal_arg_flag = 1;
+
gfc_resolve_array_spec (sym->as, check_constant);
+ formal_arg_flag = 0;
+
/* Resolve formal namespaces. */
if (formal_ns_flag && sym != NULL && sym->formal_ns != NULL)