Nonsensical error

Janus Weil janus@gcc.gnu.org
Thu Jan 2 15:24:00 GMT 2014


Hi Salvatore,

> With the current trunk I am getting this error message, which I find
> rather nonsensical (yes, if I put a "call" in front of it, it better
> not be a function, thank you very much :) )
> =======================================
> psb_s_renum_impl.F90:298.22:
>
>     call a%mv_to(acsc)
>                       1
> Error: 'psb_s_mv_to' at (1) is not a function

sure as hell comes from this piece of code in resolve_function:

  if (sym && (sym->attr.flavor == FL_VARIABLE || sym->attr.subroutine))
    {
      gfc_error ("'%s' at %L is not a function", sym->name, &expr->where);
      return false;
    }


Since the symbol is apparently a subroutine in your case, the question
is why it is being resolved as a function ...


> The resolution from generic to specific name is correct.
> The code compiles cleanly with 4.8.1.
> Is there any obvious suspect?

I don't see any.


> Will cut a test case and open a PR asap.

That would be helpful.

Thanks,
Janus



More information about the Fortran mailing list