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) call abort
17 !$omp parallel firstprivate (ptr)
18 if (ptr () /= 2) call abort
20 !$omp parallel sections lastprivate (ptr)
23 if (ptr () /= 1) call abort
26 if (ptr () /= 2) call abort
29 if (ptr () /= 3) call abort
30 !$omp end parallel sections
31 if (ptr () /= 3) call abort
32 if (.not
.associated (ptr
, baz
)) call abort
34 integer function foo ()
37 integer function bar ()
40 integer function baz ()