Update concepts branch to revision 131834
[official-gcc.git] / libgomp / testsuite / libgomp.c++ / pr35185.C
blobf22c7720787b7971e09f724e5627160cfbe55be5
1 // PR middle-end/35185
2 // { dg-do run }
4 extern "C" void abort ();
6 struct S
8   S () : s (6) {}
9   ~S () {}
10   int s;
13 __attribute__((noinline))
14 bool
15 bar (S s)
17   return s.s != 6;
20 int
21 main ()
23   S s;
24   int err = 0;
25 #pragma omp parallel shared (s)
26   {
27     if (bar (s))
28       #pragma omp atomic
29         err++;
30   }
31   if (err)
32     abort ();