Simplify comparison of attrs in IPA ICF.
[official-gcc.git] / libgomp / testsuite / libgomp.oacc-fortran / kernels-private-vars-loop-worker-2.f90
blob7924e7f13a62004898ce40ae2f8206a5564095cd
1 ! Test of worker-private variables declared on a loop directive, broadcasting
2 ! to vector-partitioned mode.
4 ! { dg-do run }
6 program main
7 integer :: x, i, j, k, idx, arr(0:32*32*32)
9 do i = 0, 32*32*32-1
10 arr(i) = i
11 end do
13 !$acc kernels copy(arr)
14 !$acc loop gang(num:32)
15 do i = 0, 31
16 !$acc loop worker(num:8) private(x)
17 do j = 0, 31
18 x = ieor(i, j * 3)
20 !$acc loop vector(length:32)
21 do k = 0, 31
22 arr(i * 1024 + j * 32 + k) = arr(i * 1024 + j * 32 + k) + x * k
23 end do
24 end do
25 end do
26 !$acc end kernels
28 do i = 0, 32 - 1
29 do j = 0, 32 -1
30 do k = 0, 32 - 1
31 idx = i * 1024 + j * 32 + k
32 if (arr(idx) .ne. idx + ieor(i, j * 3) * k) call abort
33 end do
34 end do
35 end do
36 end program main