URL
https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk
Subversion Repositories openrisc_me
[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gfortran.dg/] [proc_ptr_20.f90] - Rev 313
Go to most recent revision | Compare with Previous | Blame | View Log
! { dg-do run }
!
! PR 40450: [F03] procedure pointer as actual argument
!
! Contributed by John McFarland <john.mcfarland@swri.org>
MODULE m
ABSTRACT INTERFACE
SUBROUTINE sub()
END SUBROUTINE sub
END INTERFACE
CONTAINS
SUBROUTINE passf(f2)
PROCEDURE(sub), POINTER:: f2
CALL callf(f2)
END SUBROUTINE passf
SUBROUTINE callf(f3)
PROCEDURE(sub), POINTER :: f3
PRINT*, 'calling f'
CALL f3()
END SUBROUTINE callf
END MODULE m
PROGRAM prog
USE m
PROCEDURE(sub), POINTER :: f1
f1 => s
CALL passf(f1)
CONTAINS
SUBROUTINE s
PRINT*, 'sub'
END SUBROUTINE s
END PROGRAM prog
! { dg-final { cleanup-modules "m" } }
Go to most recent revision | Compare with Previous | Blame | View Log