Debian Codegraph @

gcc/testsuite/gfortran.dg/proc_ptr_comp_10.f90

raw
1 ! { dg-do compile }
2 !
3 ! PR 40176: Fortran 2003: Procedure pointers with array return value
4 !
5 ! Contributed by Janus Weil <[email protected]>
6
7 module m
8
9 abstract interface
10 function ai()
11 real, dimension(3) :: ai
12 end function
13 end interface
14
15 type t
16 procedure(ai), pointer, nopass :: ppc
17 end type
18
19 procedure(ai), pointer :: pp
20
21 end module
22
23 program test
24 use m
25 type(t) :: obj
26 obj%ppc => pp
27 pp => obj%ppc
28 end