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, 3 insertions, 2 deletions
diff --git a/gcc/fortran/resolve.cc b/gcc/fortran/resolve.cc
index ddd9827..b9c469a 100644
--- a/gcc/fortran/resolve.cc
+++ b/gcc/fortran/resolve.cc
@@ -7351,8 +7351,9 @@ resolve_compcall (gfc_expr* e, const char **name)
/* Check that's really a FUNCTION. */
if (!e->value.compcall.tbp->function)
{
- gfc_error ("%qs at %L should be a FUNCTION",
- e->value.compcall.name, &e->where);
+ if (e->symtree && e->symtree->n.sym->resolve_symbol_called)
+ gfc_error ("%qs at %L should be a FUNCTION", e->value.compcall.name,
+ &e->where);
return false;
}