summaryrefslogtreecommitdiff
path: root/gcc/fortran/match.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/fortran/match.c')
-rw-r--r--gcc/fortran/match.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/gcc/fortran/match.c b/gcc/fortran/match.c
index 3b9d3d21d71..f7ff9bbdc3b 100644
--- a/gcc/fortran/match.c
+++ b/gcc/fortran/match.c
@@ -2589,9 +2589,12 @@ gfc_match_call (void)
if (sym->attr.flavor != FL_PROCEDURE && sym->ts.type == BT_DERIVED)
return match_typebound_call (st);
- /* If it does not seem to be callable... */
+ /* If it does not seem to be callable (include functions so that the
+ right association is made. They are thrown out in resolution.)
+ ... */
if (!sym->attr.generic
- && !sym->attr.subroutine)
+ && !sym->attr.subroutine
+ && !sym->attr.function)
{
if (!(sym->attr.external && !sym->attr.referenced))
{