This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: problem with default initialized pointers in types?
Hi Daniel,
Daniel Franke wrote:
> Eventually, I found what caused this: in an attempt to separate interface and
> implementation, the explicit interface specified INTENT(out) while the actual
> interface of the subroutine had INTENT(in) ... =(
>
> Is there any way to notify the user about a non-matching interface as
> INTERFACE
> for a subroutine like
> SUBROUTINE foo(n)
>
This is difficult. gfortran currently does not check for such mismatches
in the same file. (This is planed, however, maybe it will even be done
during the 4.3 development.)
A longer-term project would be to check these if the two files are
passed at the same time - or to generate interface information and check
that. (For instance the Intel compiler has -gen-interface, which
generates *.mod [and also .f90] files for procedures etc. which are not
in a module. Another possibility would be to put this information into
the .o file and check at link time, using the interprocess/file
optimization infrastructure, planned to be merged in 4.3)
Tobias