Dead
[official-gcc.git] / gomp-20050608-branch / libgomp / testsuite / libgomp.fortran / crayptr1.f90
blob57c59f71f9fe7ffbe89fbb75b4bd9fc2f28dd82e
1 ! { dg-do run }
2 ! { dg-options "-fopenmp -fcray-pointer" }
4 use omp_lib
5 integer :: a, b, c, p
6 logical :: l
7 pointer (ip, p)
8 a = 1
9 b = 2
10 c = 3
11 l = .false.
12 ip = loc (a)
14 !$omp parallel num_threads (2) reduction (.or.:l)
15 l = p .ne. 1
16 !$omp barrier
17 !$omp master
18 ip = loc (b)
19 !$omp end master
20 !$omp barrier
21 l = l .or. p .ne. 2
22 !$omp barrier
23 if (omp_get_thread_num () .eq. 1 .or. omp_get_num_threads () .lt. 2) &
24 ip = loc (c)
25 !$omp barrier
26 l = l .or. p .ne. 3
27 !$omp end parallel
29 if (l) call abort
31 l = .false.
32 !$omp parallel num_threads (2) reduction (.or.:l) default (private)
33 ip = loc (a)
34 a = 3 * omp_get_thread_num () + 4
35 b = a + 1
36 c = a + 2
37 l = p .ne. 3 * omp_get_thread_num () + 4
38 ip = loc (c)
39 l = l .or. p .ne. 3 * omp_get_thread_num () + 6
40 ip = loc (b)
41 l = l .or. p .ne. 3 * omp_get_thread_num () + 5
42 !$omp end parallel
44 if (l) call abort
46 end