* c-c++-common/Wrestrict.c (test_strcpy_range): Revert latest change.
[official-gcc.git] / libgomp / testsuite / libgomp.c / pr32362-1.c
blob55807e33a496488c4b9f6f6a74db0960be21ae6a
1 /* PR middle-end/32362 */
2 /* { dg-do run } */
4 #include <omp.h>
5 #include <stdlib.h>
7 int
8 main ()
10 int n[4] = { -1, -1, -1, -1 };
11 static int a = 2, b = 4;
12 omp_set_num_threads (4);
13 omp_set_dynamic (0);
14 omp_set_nested (1);
15 #pragma omp parallel private(b)
17 b = omp_get_thread_num ();
18 #pragma omp parallel firstprivate(a)
20 a = (omp_get_thread_num () + a) + 1;
21 if (b == omp_get_thread_num ())
22 n[omp_get_thread_num ()] = a + (b << 4);
25 if (n[0] != 3)
26 abort ();
27 if (n[3] != -1
28 && (n[1] != 0x14 || n[2] != 0x25 || n[3] != 0x36))
29 abort ();
30 return 0;