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: 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


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