| 1 |
! { dg-do compile } |
| 2 |
! { dg-additional-options "-fdump-tree-original" } |
| 3 |
! { dg-additional-options "--param=openacc-kernels=decompose" } |
| 4 |
! { dg-additional-options "-fdump-tree-omp_oacc_kernels_decompose" } |
| 5 |
|
| 6 |
! { dg-additional-options -Wuninitialized } |
| 7 |
|
| 8 |
program test |
| 9 |
implicit none |
| 10 |
integer :: q, i, j, k, m, n, o, p, r, s, t, u, v, w |
| 11 |
! { dg-note {'i' was declared here} {} { target *-*-* } .-1 } |
| 12 |
logical :: l = .true. |
| 13 |
|
| 14 |
!$acc kernels if(l) async num_gangs(i) num_workers(i) vector_length(i) & |
| 15 |
!$acc self & |
| 16 |
!$acc copy(i), copyin(j), copyout(k), create(m) & |
| 17 |
!$acc no_create(n) & |
| 18 |
!$acc present(o), pcopy(p), pcopyin(r), pcopyout(s), pcreate(t) & |
| 19 |
!$acc deviceptr(u) |
| 20 |
! { dg-warning {'i' is used uninitialized} {} { target *-*-* } .-1 } |
| 21 |
!$acc end kernels |
| 22 |
|
| 23 |
end program test |
| 24 |
! { dg-final { scan-tree-dump-times "pragma acc kernels" 1 "original" } } |
| 25 |
|
| 26 |
! { dg-final { scan-tree-dump-times "if" 1 "original" } } |
| 27 |
! { dg-final { scan-tree-dump-times "async" 1 "original" } } |
| 28 |
! { dg-final { scan-tree-dump-times "num_gangs" 1 "original" } } |
| 29 |
! { dg-final { scan-tree-dump-times "num_workers" 1 "original" } } |
| 30 |
! { dg-final { scan-tree-dump-times "vector_length" 1 "original" } } |
| 31 |
! { dg-final { scan-tree-dump-times "self\\(1\\)" 1 "original" } } |
| 32 |
! { dg-final { scan-tree-dump-times "map\\(tofrom:i\\)" 1 "original" } } |
| 33 |
! { dg-final { scan-tree-dump-times "map\\(to:j\\)" 1 "original" } } |
| 34 |
! { dg-final { scan-tree-dump-times "map\\(from:k\\)" 1 "original" } } |
| 35 |
! { dg-final { scan-tree-dump-times "map\\(alloc:m\\)" 1 "original" } } |
| 36 |
! { dg-final { scan-tree-dump-times "map\\(no_alloc:n\\)" 1 "original" } } |
| 37 |
! { dg-final { scan-tree-dump-times "map\\(force_present:o\\)" 1 "original" } } |
| 38 |
! { dg-final { scan-tree-dump-times "map\\(tofrom:p\\)" 1 "original" } } |
| 39 |
! { dg-final { scan-tree-dump-times "map\\(to:r\\)" 1 "original" } } |
| 40 |
! { dg-final { scan-tree-dump-times "map\\(from:s\\)" 1 "original" } } |
| 41 |
! { dg-final { scan-tree-dump-times "map\\(alloc:t\\)" 1 "original" } } |
| 42 |
|
| 43 |
! { dg-final { scan-tree-dump-times "map\\(force_deviceptr:u\\)" 1 "original" } } |
| 44 |
|
| 45 |
! { dg-final { scan-tree-dump-times {(?n)#pragma omp target oacc_data_kernels if\((?:D\.|_)[0-9]+\) self\(1\)$} 1 "omp_oacc_kernels_decompose" } } |
| 46 |
! { dg-final { scan-tree-dump-times {(?n)#pragma omp target oacc_parallel_kernels_gang_single num_gangs\(1\) if\((?:D\.|_)[0-9]+\) self\(1\) async\(-1\)$} 1 "omp_oacc_kernels_decompose" } } |