| 1 |
! { dg-do run } |
| 2 |
|
| 3 |
! { dg-additional-options "-fopt-info-omp-all" } |
| 4 |
! { dg-additional-options "-foffload=-fopt-info-all-omp" } |
| 5 |
|
| 6 |
! { dg-additional-options "--param=openacc-kernels=decompose" } |
| 7 |
|
| 8 |
! { dg-additional-options "--param=openacc-privatization=noisy" } |
| 9 |
! { dg-additional-options "-foffload=--param=openacc-privatization=noisy" } |
| 10 |
! Prune a few: uninteresting, and potentially varying depending on GCC configuration (data types): |
| 11 |
! { dg-prune-output {note: variable 'D\.[0-9]+' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} } |
| 12 |
|
| 13 |
! It's only with Tcl 8.5 (released in 2007) that "the variable 'varName' |
| 14 |
! passed to 'incr' may be unset, and in that case, it will be set to [...]", |
| 15 |
! so to maintain compatibility with earlier Tcl releases, we manually |
| 16 |
! initialize counter variables: |
| 17 |
! { dg-line l_dummy[variable c_compute 0 c_loop_i 0] } |
| 18 |
! { dg-message "dummy" "" { target iN-VAl-Id } l_dummy } to avoid |
| 19 |
! "WARNING: dg-line var l_dummy defined, but not used". |
| 20 |
|
| 21 |
subroutine kernel(lo, hi, a, b, c) |
| 22 |
implicit none |
| 23 |
integer :: lo, hi, i |
| 24 |
real, dimension(lo:hi) :: a, b, c |
| 25 |
|
| 26 |
!$acc kernels copyin(lo, hi) ! { dg-line l_compute[incr c_compute] } |
| 27 |
! { dg-note {variable 'lo\.[0-9]+' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_compute$c_compute } |
| 28 |
! { dg-note {variable 'hi\.[0-9]+' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_compute$c_compute } |
| 29 |
!$acc loop independent ! { dg-line l_loop_i[incr c_loop_i] } |
| 30 |
! { dg-note {parallelized loop nest in OpenACC 'kernels' region} {} { target *-*-* } l_loop_i$c_loop_i } |
| 31 |
! { dg-note {variable 'i' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_i$c_loop_i } |
| 32 |
! { dg-optimized "assigned OpenACC gang vector loop parallelism" "" { target *-*-* } l_loop_i$c_loop_i } |
| 33 |
do i = lo, hi |
| 34 |
b(i) = a(i) |
| 35 |
end do |
| 36 |
!$acc loop independent ! { dg-line l_loop_i[incr c_loop_i] } |
| 37 |
! { dg-note {parallelized loop nest in OpenACC 'kernels' region} {} { target *-*-* } l_loop_i$c_loop_i } |
| 38 |
! { dg-note {variable 'i' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop_i$c_loop_i } |
| 39 |
! { dg-optimized "assigned OpenACC gang vector loop parallelism" "" { target *-*-* } l_loop_i$c_loop_i } |
| 40 |
do i = lo, hi |
| 41 |
c(i) = b(i) |
| 42 |
end do |
| 43 |
!$acc end kernels |
| 44 |
end subroutine kernel |
| 45 |
|
| 46 |
program main |
| 47 |
integer :: n = 20 |
| 48 |
real, dimension(1:20) :: a, b, c |
| 49 |
|
| 50 |
a(:) = 1 |
| 51 |
b(:) = 2 |
| 52 |
c(:) = 3 |
| 53 |
|
| 54 |
call kernel(1, n, a, b, c) |
| 55 |
|
| 56 |
do i = 1, n |
| 57 |
if (c(i) .ne. 1) call abort |
| 58 |
end do |
| 59 |
end program main |