http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46060
janus at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
AssignedTo|unassigned at gcc dot |janus at gcc dot gnu.org
|gnu.org |
--- Comment #5 from janus at gcc dot gnu.org 2010-10-18 20:48:26 UTC ---
Here is a preliminary patch:
Index: gcc/fortran/primary.c
===================================================================
--- gcc/fortran/primary.c (revision 165600)
+++ gcc/fortran/primary.c (working copy)
@@ -1883,13 +1883,20 @@ gfc_match_varspec (gfc_expr *primary, int equiv_fl
if (component->attr.proc_pointer && ppc_arg
&& !gfc_matching_procptr_assignment)
{
+ /* Procedure pointer component call: Look for argument list. */
m = gfc_match_actual_arglist (sub_flag,
&primary->value.compcall.actual);
if (m == MATCH_ERROR)
return MATCH_ERROR;
- if (m == MATCH_YES)
- primary->expr_type = EXPR_PPC;
+ if (m == MATCH_NO)
+ {
+ gfc_error ("Procedure pointer component '%s' requires an "
+ "argument list at %C", component->name);
+ return MATCH_ERROR;
+ }
+
+ primary->expr_type = EXPR_PPC;
break;
}
It rejects the test cases in comment #0, #3 and #4 with the proper error
message, but is otherwise untested.