| 1 |
! { dg-additional-options "-fdump-tree-original" } |
| 2 |
|
| 3 |
! { dg-final { scan-tree-dump-times "#pragma omp teams thread_limit\\(9\\)" 1 "original" } } |
| 4 |
! { dg-final { scan-tree-dump-times "#pragma omp target thread_limit\\(9\\)" 1 "original" } } |
| 5 |
|
| 6 |
! { dg-final { scan-tree-dump-times "#pragma omp target nowait thread_limit\\(4\\)" 1 "original" } } |
| 7 |
! { dg-final { scan-tree-dump-times "#pragma omp parallel num_threads\\(1\\)" 1 "original" } } |
| 8 |
|
| 9 |
! { dg-final { scan-tree-dump-times "#pragma omp target thread_limit\\(6\\)" 1 "original" } } |
| 10 |
|
| 11 |
|
| 12 |
module m |
| 13 |
use omp_lib |
| 14 |
implicit none |
| 15 |
contains |
| 16 |
|
| 17 |
subroutine uncalled() |
| 18 |
!$omp target teams thread_limit (9) |
| 19 |
!$omp end target teams |
| 20 |
end |
| 21 |
|
| 22 |
subroutine foo () |
| 23 |
block |
| 24 |
!$omp target parallel nowait thread_limit (4) num_threads (1) |
| 25 |
if (omp_get_thread_limit () > 4) & |
| 26 |
stop 1 |
| 27 |
!$omp end target parallel |
| 28 |
end block |
| 29 |
!$omp taskwait |
| 30 |
end |
| 31 |
end module |
| 32 |
|
| 33 |
program main |
| 34 |
use m |
| 35 |
implicit none |
| 36 |
!$omp target thread_limit (6) |
| 37 |
if (omp_get_thread_limit () > 6) & |
| 38 |
stop 2 |
| 39 |
!$omp end target |
| 40 |
call foo () |
| 41 |
end |