fortran: Factor the evaluation of MINLOC/MAXLOC's BACK argument
[official-gcc.git] / libgomp / testsuite / libgomp.c / nested-1.c
blob925f5c55831bd81d99769c65a902dac6e52d1169
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 (1);
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 < 2 * 256 || j >= 2 * 256 + 2)
30 abort ();
31 return 0;