This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: [Patch, fortran] PR20896 - dummy procedures interfaces
- From: dominiq at lps dot ens dot fr (Dominique Dhumieres)
- To: dominiq at lps dot ens dot fr, paulthomas2 at wanadoo dot fr
- Cc: fortran at gcc dot gnu dot org
- Date: Wed, 3 Jan 2007 22:38:33 +0100 (CET)
- Subject: Re: [Patch, fortran] PR20896 - dummy procedures interfaces
> I took it, in the absence of there either being a subroutine or a
> function reference that an external procedure that was not explicitly
> typed must be a subroutine - is that not the implication of the bit
> about functions?
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.
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.
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).
Dominique