[PR testsuite/65205, libgomp/65993] Fix dg-shouldfail usage in OpenACC libgomp tests
[official-gcc.git] / libgomp / testsuite / libgomp.oacc-fortran / asyncwait-2.f90
blobbade52bdd7d296f012a25924902c6a5ebaf52952
1 ! { dg-do run }
3 program parallel_wait
4 integer, parameter :: N = 64
5 real, allocatable :: a(:), b(:), c(:)
6 integer i
8 allocate (a(N))
9 allocate (b(N))
10 allocate (c(N))
12 !$acc parallel async (0)
13 !$acc loop
14 do i = 1, N
15 a(i) = 1
16 end do
17 !$acc end parallel
19 !$acc parallel async (1)
20 !$acc loop
21 do i = 1, N
22 b(i) = 1
23 end do
24 !$acc end parallel
26 !$acc parallel wait (0, 1)
27 !$acc loop
28 do i = 1, N
29 c(i) = a(i) + b(i)
30 end do
31 !$acc end parallel
33 do i = 1, N
34 if (c(i) .ne. 2.0) call abort
35 end do
37 deallocate (a)
38 deallocate (b)
39 deallocate (c)
40 end program parallel_wait