1! { dg-do run }
2!
3! PR 45290: [F08] pointer initialization
4!
5! Contributed by Janus Weil <janus@gcc.gnu.org>
6
7module m
8
9implicit none
10
11procedure(f1), pointer :: pp => f1
12
13type :: t
14  procedure(f2), pointer, nopass :: ppc => f2
15end type
16
17contains
18
19  integer function f1()
20    f1 = 42
21  end function
22
23  integer function f2()
24    f2 = 43
25  end function
26
27end module
28
29
30program test_ptr_init
31
32use m
33implicit none
34
35type (t) :: u
36
37if (pp()/=42) call abort()
38if (u%ppc()/=43) call abort()
39
40end
41