blob: 1bfb4f1554de300aa8fa289342f454f59216e774 [file] [log] [blame]
! 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
end program test