This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch, fortran] PR20896 - dummy procedures interfaces


Dominique,

It is not the way I read 12.4.1.2. My reading is:
1) if it is typed or it is used as a function (I assume it means
something like a=b() within the scoping unit), then it is a function;
2) if it is not typed and used as a subroutine (I assume it means
something like CALL b() within the scoping unit), then it a subroutine;
3) otherwise it will be resolved at the level of the external procedure
to which it is passed as a dummy argument, hence could not be used in a generic interface.
OK then that is what I will do.
But indeed, this is far beyond what I really understand in f95 (if any:
when I first looked at f90, I thought they had produced a monster,
and don't feel to have been proven wrong!-). Nevertheless  it seems
that the xlf engineers had a reading similar to mine.

I think that you are a bit mixed up.
I should have said that so was I :-)

Yes indeed, but the logic I tried to follow was: without type and without implicit none, s_ext could be a real function (at least I still do not see why it could not be), then with implicit none it should be typed to be a function (no default type), hence implicit none could establish s_ext as a subroutine. I agree this is highly convoluted (but who would claim that f95 is not) and apparently things are not working this way (xlf still complains that it does know if it is a function or a subroutine).

It's the requirement that the typing should be explicit or that the procedure be referenced as a function, is it not?

Thanks

Paul


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]