| 1 |
! Ensure that each parallel reduction variable as a copy or pcopy |
| 2 |
! data clause. |
| 3 |
|
| 4 |
! { dg-additional-options "-fdump-tree-gimple" } |
| 5 |
|
| 6 |
program test |
| 7 |
implicit none |
| 8 |
integer :: v1, v2 |
| 9 |
|
| 10 |
!$acc parallel reduction(+:v1,v2) |
| 11 |
!$acc end parallel |
| 12 |
|
| 13 |
!$acc parallel reduction(+:v1,v2) copy(v1,v2) |
| 14 |
!$acc end parallel |
| 15 |
|
| 16 |
!$acc parallel reduction(+:v1,v2) pcopy(v1,v2) |
| 17 |
!$acc end parallel |
| 18 |
|
| 19 |
!$acc parallel reduction(+:v1,v2) present(v1,v2) |
| 20 |
!$acc end parallel |
| 21 |
|
| 22 |
!$acc parallel reduction(+:v1,v2) copyin(v1,v2) ! { dg-warning "incompatible data clause" } |
| 23 |
!$acc end parallel |
| 24 |
|
| 25 |
!$acc parallel reduction(+:v1,v2) pcopyin(v1,v2) ! { dg-warning "incompatible data clause" } |
| 26 |
!$acc end parallel |
| 27 |
|
| 28 |
!$acc parallel reduction(+:v1,v2) copyout(v1,v2) ! { dg-warning "incompatible data clause" } |
| 29 |
!$acc end parallel |
| 30 |
|
| 31 |
!$acc parallel reduction(+:v1,v2) pcopyout(v1,v2) ! { dg-warning "incompatible data clause" } |
| 32 |
!$acc end parallel |
| 33 |
|
| 34 |
!$acc parallel reduction(+:v1,v2) create(v1,v2) ! { dg-warning "incompatible data clause" } |
| 35 |
!$acc end parallel |
| 36 |
|
| 37 |
!$acc parallel reduction(+:v1,v2) pcreate(v1,v2) ! { dg-warning "incompatible data clause" } |
| 38 |
!$acc end parallel |
| 39 |
|
| 40 |
|
| 41 |
!$acc serial reduction(+:v1,v2) |
| 42 |
!$acc end serial |
| 43 |
|
| 44 |
!$acc serial reduction(+:v1,v2) copy(v1,v2) |
| 45 |
!$acc end serial |
| 46 |
|
| 47 |
!$acc serial reduction(+:v1,v2) pcopy(v1,v2) |
| 48 |
!$acc end serial |
| 49 |
|
| 50 |
!$acc serial reduction(+:v1,v2) present(v1,v2) |
| 51 |
!$acc end serial |
| 52 |
|
| 53 |
!$acc serial reduction(+:v1,v2) copyin(v1,v2) ! { dg-warning "incompatible data clause" } |
| 54 |
!$acc end serial |
| 55 |
|
| 56 |
!$acc serial reduction(+:v1,v2) pcopyin(v1,v2) ! { dg-warning "incompatible data clause" } |
| 57 |
!$acc end serial |
| 58 |
|
| 59 |
!$acc serial reduction(+:v1,v2) copyout(v1,v2) ! { dg-warning "incompatible data clause" } |
| 60 |
!$acc end serial |
| 61 |
|
| 62 |
!$acc serial reduction(+:v1,v2) pcopyout(v1,v2) ! { dg-warning "incompatible data clause" } |
| 63 |
!$acc end serial |
| 64 |
|
| 65 |
!$acc serial reduction(+:v1,v2) create(v1,v2) ! { dg-warning "incompatible data clause" } |
| 66 |
!$acc end serial |
| 67 |
|
| 68 |
!$acc serial reduction(+:v1,v2) pcreate(v1,v2) ! { dg-warning "incompatible data clause" } |
| 69 |
!$acc end serial |
| 70 |
|
| 71 |
end program test |
| 72 |
|
| 73 |
! { dg-final { scan-tree-dump-times "map.tofrom:v1" 18 "gimple" } } |
| 74 |
! { dg-final { scan-tree-dump-times "map.tofrom:v2" 18 "gimple" } } |
| 75 |
! { dg-final { scan-tree-dump-times "map.force_present:v1" 2 "gimple" } } |
| 76 |
! { dg-final { scan-tree-dump-times "map.force_present:v2" 2 "gimple" } } |