2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
[official-gcc.git] / libgomp / testsuite / libgomp.c++ / pr82835.C
blobdf64ecfb1cf1feb61889c761ea7a3e7e84245e14
1 // PR c++/82835
2 // { dg-do run }
4 int a, b;
6 template <class>
7 struct C {
8   C (int x = a) : c (5) { if (x != 137) __builtin_abort (); }
9   int c;
12 struct D {
13   void foo ();
14   int d;
17 void
18 D::foo ()
20   C<int> c;
21 #pragma omp for private (c)
22   for (b = 0; b < d; b++)
23     c.c++;
26 int
27 main ()
29   a = 137;
30   D d;
31   d.d = 16;
32   d.foo ();
33   return 0;