| 1 |
! { dg-do compile } |
| 2 |
! { dg-additional-options "-fdump-tree-gimple" } |
| 3 |
|
| 4 |
module main |
| 5 |
implicit none |
| 6 |
interface |
| 7 |
subroutine f2 (a) |
| 8 |
integer, intent(in) :: a |
| 9 |
end subroutine |
| 10 |
end interface |
| 11 |
contains |
| 12 |
|
| 13 |
subroutine test () |
| 14 |
integer :: a |
| 15 |
|
| 16 |
!$omp dispatch device(-25373654) |
| 17 |
! { dg-final { scan-tree-dump-times "__builtin_omp_set_default_device \\(-25373654\\);" 1 "gimple" } } |
| 18 |
call f2 (a) |
| 19 |
!$omp dispatch device(a + a) |
| 20 |
! { dg-final { scan-tree-dump-times "(D\.\[0-9]+) = a.\[0-9_]+ \\* 2;.*#pragma omp dispatch.*__builtin_omp_set_default_device \\(\\1\\);.*f2 \\(&a\\)" 2 "gimple" } } |
| 21 |
call f2 (a) |
| 22 |
end subroutine |
| 23 |
end module |
| 24 |
|
| 25 |
! { dg-final { scan-tree-dump-times "(D\.\[0-9]+) = __builtin_omp_get_default_device \\(\\);.*__builtin_omp_set_default_device \\(\\1\\);" 4 "gimple" } } |