blob: 9056403a91f2ee56e23e02602e2c534cc50cd3d2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
! test for private variables in a reduction clause
! { dg-additional-options "-fopt-info-note-omp" }
! { dg-additional-options "--param=openacc-privatization=noisy" } for
! testing/documenting aspects of that functionality.
program test
implicit none
integer, parameter :: n = 100
integer :: i, k
! !$acc parallel private (k) reduction (+:k)
! do i = 1, n
! k = k + 1
! end do
! !$acc end parallel
!$acc parallel private (k)
k = 0
!$acc loop reduction (+:k)
! { dg-note {variable 'i' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-1 }
do i = 1, n
k = k + 1
end do
!$acc end parallel
! !$acc serial private (k) reduction (+:k)
! do i = 1, n
! k = k + 1
! end do
! !$acc end serial
!$acc serial private (k)
k = 0
!$acc loop reduction (+:k)
! { dg-note {variable 'i' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-1 }
do i = 1, n
k = k + 1
end do
!$acc end serial
end program test
|