This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: Is this legal?
- From: Salvatore Filippone <sfilippone at uniroma2 dot it>
- To: fortran at gcc dot gnu dot org
- Date: Mon, 06 Sep 2004 13:12:56 +0200
- Subject: Re: Is this legal?
An update: the following modification looks like a bug to me (a PRIVATE
subroutine accessible from outside its module??)
Thanks for any clarifications..
/usr/local/gfortran/bin/gfortran -o trymod trymod.f90
[sfilippo@euler PSBLAS]$ ./trymod
From subroutine (internal) SUB2 called from sub1
From subroutine (internal) SUB2 called from Main
STOP 0
----------- trymod.f90--------------
module aaa
private
public :: sub1
contains
subroutine sub1()
call sub2('sub1')
end subroutine sub1
subroutine sub2(str)
character(len=*), intent(in) :: str
write(*,*) 'From subroutine (internal) SUB2 called from ',str
end subroutine sub2
end module aaa
program trymod
use aaa
call sub1()
call sub2('Main')
stop
end program trymod
--
Salvatore Filippone -- sfilippone@NOSPAMuniroma2.it