aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/interface.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/fortran/interface.c')
-rw-r--r--gcc/fortran/interface.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/gcc/fortran/interface.c b/gcc/fortran/interface.c
index 519251e..b900b10 100644
--- a/gcc/fortran/interface.c
+++ b/gcc/fortran/interface.c
@@ -1908,13 +1908,15 @@ compare_actual_formal (gfc_actual_arglist **ap, gfc_formal_arglist *formal,
}
/* Check intent = OUT/INOUT for definable actual argument. */
- if (a->expr->expr_type != EXPR_VARIABLE
+ if ((a->expr->expr_type != EXPR_VARIABLE
+ || a->expr->symtree->n.sym->attr.flavor != FL_VARIABLE)
&& (f->sym->attr.intent == INTENT_OUT
|| f->sym->attr.intent == INTENT_INOUT))
{
if (where)
- gfc_error ("Actual argument at %L must be definable to "
- "match dummy INTENT = OUT/INOUT", &a->expr->where);
+ gfc_error ("Actual argument at %L must be definable as "
+ "the dummy argument '%s' is INTENT = OUT/INOUT",
+ &a->expr->where, f->sym->name);
return 0;
}