c-family: Enable -fpermissive for C and ObjC
[official-gcc.git] / libgomp / testsuite / libgomp.c++ / pr88988.C
blob9dea35d15fe0c014b283655704833d4d817dc481
1 // PR c++/88988
2 // { dg-do compile }
3 // { dg-additional-options "-std=c++14" }
5 extern "C" void abort ();
7 template <typename T>
8 struct A {
9   A () : a(), b()
10   {
11     [&] ()
12     {
13 #pragma omp task firstprivate (a) shared (b)
14       b = ++a;
15 #pragma omp taskwait
16     } ();
17   }
19   T a, b;
22 int
23 main ()
25   A<int> x;
26   if (x.a != 0 || x.b != 1)
27     abort ();