Merge from trunk
[official-gcc.git] / gcc / testsuite / g++.dg / gomp / pr59297.C
blob330ed2e00b1c5c2792eabf8600f67a33a55c1e83
1 // PR c++/59297
2 // { dg-do compile }
3 // { dg-options "-fopenmp" }
5 template <typename T>
6 struct A
8   ~A ();
9   const T &operator[] (int) const;
12 struct B
14   int &operator () (A <int>);
17 void
18 foo (B &x, int &z)
20   A<A<int> > y;
21   #pragma omp atomic
22   x (y[0]) += 1;
23   #pragma omp atomic
24   z += x(y[1]);