2012-09-17 Janus Weil <janus@gcc.gnu.org>
[official-gcc.git] / gcc / testsuite / gfortran.dg / proc_ptr_result_7.f90
blob1d810c6b5fad14c170eaded102bb71740be3853f
1 ! { dg-do run }
3 ! PR 54285: [F03] Calling a PPC with proc-ptr result
5 ! Contributed by Janus Weil <janus@gcc.gnu.org>
7 type :: t
8 procedure(a), pointer, nopass :: p
9 end type
11 type(t) :: x
12 procedure(iabs), pointer :: pp
14 x%p => a
16 pp => x%p()
18 if (pp(-3) /= 3) call abort
20 contains
22 function a() result (b)
23 procedure(iabs), pointer :: b
24 b => iabs
25 end function
27 end