Debian Codegraph @

gcc/testsuite/gfortran.dg/proc_ptr_12.f90

raw
1 ! { dg-do run }
2 !
3 ! PR 36704: Procedure pointer as function result
4 !
5 ! Contributed by Janus Weil <[email protected]>
6
7 procedure(integer),pointer :: p
8 p => foo()
9 if (p(-1)/=1) STOP 1
10 contains
11 function foo() result(bar)
12 procedure(integer),pointer :: bar
13 bar => iabs
14 end function
15 end