3 integer function foo ()
5 integer function bar ()
7 integer function baz ()
10 procedure(foo
), pointer :: ptr
13 !$omp parallel shared (ptr)
14 if (ptr () /= 1) stop 1
17 !$omp parallel firstprivate (ptr)
18 if (ptr () /= 2) stop 2
20 !$omp parallel sections lastprivate (ptr)
23 if (ptr () /= 1) stop 3
26 if (ptr () /= 2) stop 4
29 if (ptr () /= 3) stop 5
30 !$omp end parallel sections
31 if (ptr () /= 3) stop 6
32 if (.not
.associated (ptr
, baz
)) stop 7
34 integer function foo ()
37 integer function bar ()
40 integer function baz ()