static try
-check_rest (bt type, int kind, gfc_actual_arglist *arg)
+check_rest (bt type, int kind, gfc_actual_arglist *arglist)
{
- gfc_expr *x, *first_arg;
- int n;
- char buffer[80];
+ gfc_actual_arglist *arg, *tmp;
- if (min_max_args (arg) == FAILURE)
- return FAILURE;
+ gfc_expr *x;
+ int m, n;
- n = 1;
+ if (min_max_args (arglist) == FAILURE)
+ return FAILURE;
- first_arg = arg->expr;
- for (; arg; arg = arg->next, n++)
+ for (arg = arglist, n=1; arg; arg = arg->next, n++)
{
x = arg->expr;
if (x->ts.type != type || x->ts.kind != kind)
}
}
- snprintf (buffer, 80, "arguments '%s' and '%s' for intrinsic '%s'",
- gfc_current_intrinsic_arg[0], gfc_current_intrinsic_arg[n-1],
- gfc_current_intrinsic);
- if (gfc_check_conformance (buffer, first_arg, x) == FAILURE)
- return FAILURE;
+ for (tmp = arglist, m=1; tmp != arg; tmp = tmp->next, m++)
+ {
+ char buffer[80];
+ snprintf (buffer, 80, "arguments 'a%d' and 'a%d' for intrinsic '%s'",
+ m, n, gfc_current_intrinsic);
+ if (gfc_check_conformance (buffer, tmp->expr, x) == FAILURE)
+ return FAILURE;
+ }
}
return SUCCESS;