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 ()