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: Paul Thomas <paulthomas2 at wanadoo dot fr>
- To: Dominique Dhumieres <dominiq at lps dot ens dot fr>
- Cc: fortran at gcc dot gnu dot org
- Date: Wed, 03 Jan 2007 21:26:14 +0100
- Subject: Re: [Patch, fortran] PR20896 - dummy procedures interfaces
- References: <20070103201806.263AB5BB46@mailhost.lps.ens.fr>
Dominique,
As these modules and main are written I don't see how the compiler can
know that p1 is a SUBROUTINE or a FUNCTION. I tried IMPLICIT NONE, but
it does not help.
At the risk of repeating myself:
from 12.4.1.2
If the interface of the dummy procedure is implicit and either the name
of the dummy procedure
is explicitly typed or the procedure is referenced as a function, the
dummy procedure shall not be
referenced as a subroutine and the actual argument shall be a function
or dummy procedure.
If the interface of the dummy procedure is implicit and a reference to
the procedure appears as a
subroutine reference, the actual argument shall be a subroutine or dummy
procedure.
In the main program:
+ external f_ext, s_ext
+ real f_ext
marks f_ext as a function and s_ext as a subroutine, does it not? IMPLICIT NONE has nothing to do with it, since it is explicit typing that makes it happen.
Paul