| 1 |
! { dg-do compile } |
| 2 |
|
| 3 |
implicit none |
| 4 |
|
| 5 |
integer :: a, b, c |
| 6 |
|
| 7 |
!$omp requires reverse_offload |
| 8 |
|
| 9 |
|
| 10 |
!$omp target device (ancestor: 1) |
| 11 |
!$omp end target |
| 12 |
|
| 13 |
!$omp target device (ancestor : a) |
| 14 |
!$omp end target |
| 15 |
|
| 16 |
!$omp target device (ancestor : a + 1) |
| 17 |
!$omp end target |
| 18 |
|
| 19 |
|
| 20 |
! Ensure that the integer expression in the 'device' clause for |
| 21 |
! device-modifier 'ancestor' evaluates to '1' in case of a constant. |
| 22 |
|
| 23 |
!$omp target device (ancestor: 42) ! { dg-error "the 'device' clause expression must evaluate to '1'" } |
| 24 |
! !$omp end target |
| 25 |
|
| 26 |
!$omp target device (device_num:42) |
| 27 |
!$omp end target |
| 28 |
|
| 29 |
!$omp target device (42) |
| 30 |
!$omp end target |
| 31 |
|
| 32 |
end |