Update concepts branch to revision 131834
[official-gcc.git] / libgomp / testsuite / libgomp.fortran / sharing2.f90
blob266dd46fadb01fce48266b57248044e05bea55a8
1 ! { dg-do run }
3 use omp_lib
4 integer :: i, j, k, m, n
5 logical :: l
6 equivalence (i, m)
7 equivalence (j, n)
8 i = 4
9 j = 8
10 l = .false.
11 !$omp parallel private (k) firstprivate (i) shared (j) num_threads (2) &
12 !$omp& reduction (.or.:l)
13 l = l .or. i .ne. 4
14 l = l .or. j .ne. 8
15 !$omp barrier
16 k = omp_get_thread_num ()
17 if (k .eq. 0) then
18 i = 14
19 j = 15
20 end if
21 !$omp barrier
22 if (k .eq. 1) then
23 if (i .ne. 4 .or. j .ne. 15) l = .true.
24 i = 24
25 j = 25
26 end if
27 !$omp barrier
28 if (j .ne. 25 .or. i .ne. (k * 10 + 14)) l = .true.
29 !$omp end parallel
30 if (l) call abort
31 if (j .ne. 25) call abort
32 end