Merge from mainline (167278:168000).
[official-gcc/graphite-test-results.git] / gcc / testsuite / gfortran.dg / proc_ptr_comp_10.f90
blob382f4125533ba81fb2da98dd75fb23d5a8d8e0e1
1 ! { dg-do compile }
3 ! PR 40176: Fortran 2003: Procedure pointers with array return value
5 ! Contributed by Janus Weil <janus@gcc.gnu.org>
7 module m
9 abstract interface
10 function ai()
11 real, dimension(3) :: ai
12 end function
13 end interface
15 type t
16 procedure(ai), pointer, nopass :: ppc
17 end type
19 procedure(ai), pointer :: pp
21 end module
23 program test
24 use m
25 type(t) :: obj
26 obj%ppc => pp
27 pp => obj%ppc
28 end
30 ! { dg-final { cleanup-modules "m" } }