diff options
Diffstat (limited to 'gcc/fortran/interface.c')
-rw-r--r-- | gcc/fortran/interface.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/fortran/interface.c b/gcc/fortran/interface.c index b3ddf5f..0504c90 100644 --- a/gcc/fortran/interface.c +++ b/gcc/fortran/interface.c @@ -1972,6 +1972,15 @@ compare_parameter (gfc_symbol *formal, gfc_expr *actual, return 0; } + if (actual->ts.type == BT_ASSUMED && formal->ts.type != BT_ASSUMED) + { + if (where) + gfc_error ("Assumed-type actual argument at %L requires that dummy " + "argument '%s' is of assumed type", &actual->where, + formal->name); + return 0; + } + /* F2008, 12.5.2.5; IR F08/0073. */ if (formal->ts.type == BT_CLASS && formal->attr.class_ok && actual->expr_type != EXPR_NULL |