PR testsuite/85483: Move aarch64/sve/vcond_1.c test to g++.dg/other/
[official-gcc.git] / libgomp / testsuite / libgomp.c / pr32362-2.c
blobd4ce0918ef596a41802d762bb17167f44592d27f
1 /* PR middle-end/32362 */
2 /* { dg-do run } */
4 #include <omp.h>
5 #include <stdlib.h>
7 int a = 2, b = 4;
9 int
10 main ()
12 int n[4] = { -1, -1, -1, -1 };
13 omp_set_num_threads (4);
14 omp_set_dynamic (0);
15 omp_set_nested (1);
16 #pragma omp parallel private(b)
18 b = omp_get_thread_num ();
19 #pragma omp parallel firstprivate(a)
21 a = (omp_get_thread_num () + a) + 1;
22 if (b == omp_get_thread_num ())
23 n[omp_get_thread_num ()] = a + (b << 4);
26 if (n[0] != 3)
27 abort ();
28 if (n[3] != -1
29 && (n[1] != 0x14 || n[2] != 0x25 || n[3] != 0x36))
30 abort ();
31 return 0;