sched1: debug/model: dump predecessor list and BB num [NFC]
[gcc.git] / libgomp / testsuite / libgomp.c / omp-single-2.c
blobf16cbbeb1f32338f1b42357656ea9a60537af74e
1 #include <omp.h>
3 extern void abort (void);
5 struct X
7 int a;
8 char b;
9 int c;
12 int
13 main()
15 int i = 0;
16 struct X x;
17 int bad = 0;
19 #pragma omp parallel private (i, x) shared (bad)
21 i = 5;
23 #pragma omp single copyprivate (i, x)
25 i++;
26 x.a = 23;
27 x.b = 42;
28 x.c = 26;
31 if (i != 6 || x.a != 23 || x.b != 42 || x.c != 26)
32 bad = 1;
35 if (bad)
36 abort ();
38 return 0;