This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: [PATCH, Fortran] PROCEDURE declarations
- From: Tobias Burnus <burnus at net-b dot de>
- To: Janus Weil <jaydub66 at googlemail dot com>
- Cc: gcc-patches at gcc dot gnu dot org, fortran at gcc dot gnu dot org
- Date: Fri, 31 Aug 2007 19:28:31 +0200
- Subject: Re: [PATCH, Fortran] PROCEDURE declarations
- References: <854832d40708310811m6dce9399qaef770e683058bf6@mail.gmail.com>
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