Skip gnat.dg/prot7.adb on hppa.
[official-gcc.git] / libgomp / testsuite / libgomp.c / nested-2.c
blobab113f1bdbd7c6501de69e85402aa2d60132e1a7
1 /* { dg-additional-options "-Wno-deprecated-declarations" } */
3 #include <omp.h>
4 #include <stdlib.h>
6 int
7 main (void)
9 int i = -1, j = -1;
11 omp_set_nested (0);
12 omp_set_dynamic (0);
13 #pragma omp parallel num_threads (4)
15 #pragma omp single
17 i = omp_get_thread_num () + omp_get_num_threads () * 256;
18 #pragma omp parallel num_threads (2)
20 #pragma omp single
22 j = omp_get_thread_num () + omp_get_num_threads () * 256;
27 if (i < 4 * 256 || i >= 4 * 256 + 4)
28 abort ();
29 if (j != 256 + 0)
30 abort ();
31 return 0;