Skip gnat.dg/prot7.adb on hppa.
[official-gcc.git] / libgomp / testsuite / libgomp.c / teams-1.c
blob09b357062f8a8f98e9227f16f805ad823409af4d
1 /* { dg-additional-options "-Wno-deprecated-declarations" } */
3 #include <omp.h>
4 #include <stdlib.h>
6 int
7 main ()
9 omp_set_dynamic (0);
10 omp_set_nested (1);
11 #pragma omp teams thread_limit (2)
13 #pragma omp distribute dist_schedule(static,1)
14 for (int i = 0; i < 1; ++i)
15 if (omp_in_parallel ()
16 || omp_get_level () != 0
17 || omp_get_ancestor_thread_num (0) != 0
18 || omp_get_ancestor_thread_num (1) != -1)
19 abort ();
20 #pragma omp parallel num_threads (2)
22 if (!omp_in_parallel ()
23 || omp_get_level () != 1
24 || omp_get_ancestor_thread_num (0) != 0
25 || omp_get_ancestor_thread_num (1) != omp_get_thread_num ()
26 || omp_get_ancestor_thread_num (2) != -1)
27 abort ();
30 return 0;