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_25.f90] - Rev 302
Compare with Previous | Blame | View Log
! { dg-do run }!! PR 41139: [4.5 Regression] a procedure pointer call as actual argument!! Original test case by Barron Bichon <barron.bichon@swri.org>! Modified by Janus Weil <janus@gcc.gnu.org>PROGRAM testPROCEDURE(add), POINTER :: flogical :: g! Passing the function worksg=greater(4.,add(1.,2.))if (.not. g) call abort()! Passing the procedure pointer failsf => addg=greater(4.,f(1.,2.))if (.not. g) call abort()CONTAINSREAL FUNCTION add(x,y)REAL, INTENT(in) :: x,yprint *,"add:",x,yadd = x+yEND FUNCTION addLOGICAL FUNCTION greater(x,y)REAL, INTENT(in) :: x, ygreater = (x > y)END FUNCTION greaterEND PROGRAM test
