This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: Type-bound procedure and procedure pointer component calls
- From: dominiq at lps dot ens dot fr (Dominique Dhumieres)
- To: fortran at gcc dot gnu dot org
- Date: Wed, 27 Aug 2008 00:35:26 +0200
- Subject: Re: Type-bound procedure and procedure pointer component calls
Daniel,
Do you understand why I get an error for the following code:
[ibook-dhum] f90/bug% cat pointer_subs_red.f90
module myMod
CONTAINS
real function proc3( arg1 )
integer :: arg1
proc3 = arg1+7
end function proc3
subroutine proc4( arg1 )
real, external :: arg1
print*, 'the func: ', arg1(0)
end subroutine proc4
end module myMod
program myProg
use myMod
PROCEDURE (), POINTER :: p => NULL()
p => proc3
call proc4( p )
end program myProg
[ibook-dhum] f90/bug% gfc pointer_subs_red.f90
pointer_subs_red.f90:17.16:
call proc4( p )
1
Error: Type/rank mismatch in argument 'arg1' at (1)
TIA
Dominique