3 extern "C" void abort ();
5 struct A { int a; A () : a (6) {} };
6 struct B { int b; B () : b (5) {} };
7 struct C { int c; C () : c (4) {} };
8 struct D { int d; D () : d (3) {} };
14 #pragma omp declare reduction (+:B:omp_out.b += omp_in.b) \
15 initializer(foo (omp_priv))
26 void bar (T &x, T &y, int z)
35 struct A { int a; A () : a (0) {} };
36 #pragma omp declare reduction (+:A:bar (omp_out, omp_in, 0))
41 #pragma omp declare reduction (+:N1::A:bar (omp_out, omp_in, 1))
49 #pragma omp parallel reduction(+:g, i)
51 if (g.a != 6 || g.b != 9 || g.c != 4 || g.d != 3)
53 g.a = 1, g.b = 2, g.c = 3, g.d = 4, i = 1;
55 if (g.a != 6 || g.b != 5 + 2 * i || g.c != 4 || g.d != 3)
59 #pragma omp parallel reduction (+:b, i)