c-family: Enable -fpermissive for C and ObjC
[official-gcc.git] / libgomp / testsuite / libgomp.oacc-fortran / private-atomic-1-vector.f90
blob3f39d9e18e8f7f19d24bc746d4945a8dd438fe10
1 ! 'atomic' access of vector-private variable
3 ! { dg-do run }
5 ! { dg-additional-options "-fopt-info-note-omp" }
6 ! { dg-additional-options "--param=openacc-privatization=noisy" }
7 ! { dg-additional-options "-foffload=-fopt-info-note-omp" }
8 ! { dg-additional-options "-foffload=--param=openacc-privatization=noisy" }
9 ! for testing/documenting aspects of that functionality.
12 program main
13 integer :: w, arr(0:31)
15 !$acc parallel num_gangs(32) num_workers(32) copyout(arr)
16 !$acc loop gang worker vector private(w)
17 ! { dg-note {variable 'j' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-1 }
18 ! { dg-note {variable 'w' in 'private' clause is candidate for adjusting OpenACC privatization level} "" { target *-*-* } .-2 }
19 ! { dg-note {variable 'w' ought to be adjusted for OpenACC privatization level: 'vector'} "" { target *-*-* } .-3 }
20 ! { dg-note {variable 'w' adjusted for OpenACC privatization level: 'vector'} "" { target { ! openacc_host_selected } } .-4 }
21 do j = 0, 31
22 w = 0
23 !$acc loop seq
24 ! { dg-note {variable 'i' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-1 }
25 do i = 0, 31
26 !$acc atomic update
27 w = w + 1
28 !$acc end atomic
29 end do
30 arr(j) = w
31 end do
32 !$acc end parallel
34 if (any (arr .ne. 32)) stop 1
35 end program main