* crtstuff.c (USE_EH_FRAME_REGISTRY): Let USE_EH_FRAME_REGISTRY_ALWAYS
[official-gcc.git] / libgomp / testsuite / libgomp.fortran / crayptr3.f90
blob9777c6b22cc6b0960c3d6386ac775fa3e25a692f
1 ! { dg-do run }
2 ! { dg-options "-fopenmp -fcray-pointer" }
4 use omp_lib
5 integer :: a, b, c, i, 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) firstprivate (ip)
15 l = p .ne. 1
16 ip = loc (b)
17 if (omp_get_thread_num () .eq. 1) ip = loc (c)
18 l = l .or. (p .ne. (2 + omp_get_thread_num ()))
19 !$omp end parallel
21 if (l) call abort
23 l = .false.
24 ip = loc (a)
25 !$omp parallel do num_threads (2) reduction (.or.:l) &
26 !$omp & firstprivate (ip) lastprivate (ip)
27 do i = 0, 1
28 l = l .or. (p .ne. 1)
29 ip = loc (b)
30 if (i .eq. 1) ip = loc (c)
31 l = l .or. (p .ne. (2 + i))
32 end do
34 if (l) call abort
35 if (p .ne. 3) call abort
36 end