Daily bump.
[official-gcc.git] / libgomp / testsuite / libgomp.c / copyin-1.c
blob90e08c7db124f7d1fe0bf9070615a1b4417bfd47
1 /* { dg-do run } */
2 /* { dg-require-effective-target tls_runtime } */
4 #include <omp.h>
5 #include <stdlib.h>
7 int thr = 32;
8 #pragma omp threadprivate (thr)
10 int
11 main (void)
13 int l = 0;
15 omp_set_dynamic (0);
16 omp_set_num_threads (6);
18 #pragma omp parallel copyin (thr) reduction (||:l)
20 l = thr != 32;
21 thr = omp_get_thread_num () + 11;
24 if (l || thr != 11)
25 abort ();
27 #pragma omp parallel reduction (||:l)
28 l = thr != omp_get_thread_num () + 11;
30 if (l)
31 abort ();
32 return 0;