Hi Harald,

thanks for the comments.

> your solution looks basically correct to me, but I wonder why to
> return early w/o error.  Would the following logic be wrong?
>
> @@ -7349,7 +7357,8 @@ resolve_compcall (gfc_expr* e, const char **name)
>     gfc_symtree* target;
>
>     /* Check that's really a FUNCTION.  */
> -  if (!e->value.compcall.tbp->function)
> +  if (!e->value.compcall.tbp->function
> +      && e->symtree && e->symtree->n.sym->resolve_symbol_called)
>       {
>         gfc_error ("%qs at %L should be a FUNCTION",
>                   e->value.compcall.name, &e->where);

I didn't see the implications on first glance either, but when I combine the
two if()s, then I get four times the wrong error

Error: 'my_sub' at (1) is not a function

in typebound_call_25.f90 from the testsuite. Please note, that my initial patch
only prevents generating the error, but return false in any case. Combining the
two if()s would also prevent the return false (or I interpreted your questions
wrong). This gives different behavior. So I am curious about what Paul's
opinion is, but nevertheless feel free to voice up, if I did something wrong or
mis-unterstood your intention.

Thanks for looking at this and

Regards,
        Andre
--
Andre Vehreschild * Email: vehre ad gmx dot de

Reply via email to