From 2a573572eb310e73c4a07d2c482b02442205ebf0 Mon Sep 17 00:00:00 2001 From: Mikael Morin Date: Tue, 14 Aug 2012 16:28:29 +0000 Subject: gfortran.h (gfc_get_proc_ptr_comp): New prototype. fortran/ * gfortran.h (gfc_get_proc_ptr_comp): New prototype. (gfc_is_proc_ptr_comp): Update prototype. * expr.c (gfc_get_proc_ptr_comp): New function based on the old gfc_is_proc_ptr_comp. (gfc_is_proc_ptr_comp): Call gfc_get_proc_ptr_comp. (gfc_specification_expr, gfc_check_pointer_assign): Use gfc_get_proc_ptr_comp. * trans-array.c (gfc_walk_function_expr): Likewise. * resolve.c (resolve_structure_cons, update_ppc_arglist, resolve_ppc_call, resolve_expr_ppc): Likewise. (resolve_function): Update call to gfc_is_proc_ptr_comp. * dump-parse-tree.c (show_expr): Likewise. * interface.c (compare_actual_formal): Likewise. * match.c (gfc_match_pointer_assignment): Likewise. * primary.c (gfc_match_varspec): Likewise. * trans-io.c (gfc_trans_transfer): Likewise. * trans-expr.c (gfc_conv_variable, conv_function_val, conv_isocbinding_procedure, gfc_conv_procedure_call, gfc_trans_pointer_assignment): Likewise. (gfc_conv_procedure_call, gfc_trans_array_func_assign): Use gfc_get_proc_ptr_comp. From-SVN: r190391 --- gcc/fortran/interface.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gcc/fortran/interface.c') diff --git a/gcc/fortran/interface.c b/gcc/fortran/interface.c index 473cfd1..482c294 100644 --- a/gcc/fortran/interface.c +++ b/gcc/fortran/interface.c @@ -2558,7 +2558,7 @@ compare_actual_formal (gfc_actual_arglist **ap, gfc_formal_arglist *formal, && a->expr->symtree->n.sym->attr.proc_pointer) || (a->expr->expr_type == EXPR_FUNCTION && a->expr->symtree->n.sym->result->attr.proc_pointer) - || gfc_is_proc_ptr_comp (a->expr, NULL))) + || gfc_is_proc_ptr_comp (a->expr))) { if (where) gfc_error ("Expected a procedure pointer for argument '%s' at %L", @@ -2568,7 +2568,7 @@ compare_actual_formal (gfc_actual_arglist **ap, gfc_formal_arglist *formal, /* Satisfy 12.4.1.2 by ensuring that a procedure actual argument is provided for a procedure formal argument. */ - if (a->expr->ts.type != BT_PROCEDURE && !gfc_is_proc_ptr_comp (a->expr, NULL) + if (a->expr->ts.type != BT_PROCEDURE && !gfc_is_proc_ptr_comp (a->expr) && a->expr->expr_type == EXPR_VARIABLE && f->sym->attr.flavor == FL_PROCEDURE) { -- cgit v1.1