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,

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




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