Fix gcc.c-torture/execute/ieee/cdivchkf.c on hpux
[official-gcc.git] / libgomp / testsuite / libgomp.fortran / thread-limit-1.f90
blobbca69fbb466bd652096cfafba5af347875a96d76
1 ! { dg-additional-options "-fdump-tree-original" }
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" } }
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" } }
9 ! { dg-final { scan-tree-dump-times "#pragma omp target thread_limit\\(6\\)" 1 "original" } }
12 module m
13 use omp_lib
14 implicit none
15 contains
17 subroutine uncalled()
18 !$omp target teams thread_limit (9)
19 !$omp end target teams
20 end
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
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