This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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] PROCEDURE declarations


Hi Janus,

In general, I think it looks ok, but the following test case does not work.

Tobias


function test(a)
  implicit none
  integer :: a, test
  test = a*(-2)
end function test

subroutine test2(a,b)
  implicit none
  integer :: a
  real    :: b
  print *, a, b
end subroutine

program main
  implicit none
! Case a: This works:
!  external test
!  integer  test
! Case b: This does not work:
  procedure(integer) :: test

! The following works:
!  procedure()        :: test2
!  call test2(4,3.0)

! Fails for PROCEDURE with
! "More actual than formal arguments":
  print *, test(4)
end program main


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