* tree-loop-distribution.c (struct partition): New field recording
[official-gcc.git] / gcc / testsuite / gfortran.dg / ptr-func-1.f90
blobb7c1fc93da207eefd0c6b0a0bff22234ab20b976
1 ! { dg-do compile }
2 ! { dg-options "-std=f2008 -fall-intrinsics" }
4 ! PR fortran/46100
6 ! Pointer function as definable actual argument
7 ! - a Fortran 2008 feature
9 integer, target :: tgt
10 call one (two ())
11 if (tgt /= 774) call abort ()
12 contains
13 subroutine one (x)
14 integer, intent(inout) :: x
15 if (x /= 34) call abort ()
16 x = 774
17 end subroutine one
18 function two ()
19 integer, pointer :: two
20 two => tgt
21 two = 34
22 end function two
23 end