diff options
Diffstat (limited to 'gcc/fortran/check.c')
-rw-r--r-- | gcc/fortran/check.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/gcc/fortran/check.c b/gcc/fortran/check.c index 95c5223..d2f35ec 100644 --- a/gcc/fortran/check.c +++ b/gcc/fortran/check.c @@ -2531,13 +2531,20 @@ gfc_check_kill_sub (gfc_expr *pid, gfc_expr *sig, gfc_expr *status) bool gfc_check_kind (gfc_expr *x) { - if (x->ts.type == BT_DERIVED) + if (x->ts.type == BT_DERIVED || x->ts.type == BT_CLASS) { - gfc_error ("%qs argument of %qs intrinsic at %L must be a " - "non-derived type", gfc_current_intrinsic_arg[0]->name, + gfc_error ("%qs argument of %qs intrinsic at %L must be of " + "intrinsic type", gfc_current_intrinsic_arg[0]->name, gfc_current_intrinsic, &x->where); return false; } + if (x->ts.type == BT_PROCEDURE) + { + gfc_error ("%qs argument of %qs intrinsic at %L must be a data entity", + gfc_current_intrinsic_arg[0]->name, gfc_current_intrinsic, + &x->where); + return false; + } return true; } |