diff options
Diffstat (limited to 'gcc/fortran/check.c')
-rw-r--r-- | gcc/fortran/check.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/gcc/fortran/check.c b/gcc/fortran/check.c index 6e62d409e7b..f5e0ab5f5b8 100644 --- a/gcc/fortran/check.c +++ b/gcc/fortran/check.c @@ -3764,8 +3764,11 @@ gfc_check_rank (gfc_expr *a) ? a->value.function.esym->result->attr.pointer : a->symtree->n.sym->result->attr.pointer; - if (a->expr_type == EXPR_OP || a->expr_type == EXPR_NULL - || a->expr_type == EXPR_COMPCALL|| a->expr_type == EXPR_PPC + if (a->expr_type == EXPR_OP + || a->expr_type == EXPR_NULL + || a->expr_type == EXPR_COMPCALL + || a->expr_type == EXPR_PPC + || a->ts.type == BT_PROCEDURE || !is_variable) { gfc_error ("The argument of the RANK intrinsic at %L must be a data " |