1 // { dg-require-effective-target size32plus }
3 extern "C" void abort ();
10 inline S & operator= (const S &);
32 S<T>::operator= (const S &x)
45 S<int> r, a[1024], b[1024];
47 #pragma omp declare reduction (+: S<int>: omp_out.s += omp_in.s)
48 #pragma omp declare reduction (plus: S<int>: omp_out.s += omp_in.s) initializer (ini (omp_priv))
51 __attribute__((noipa)) void
52 foo (S<T> *a, S<T> *b)
54 #pragma omp for reduction (inscan, +:r)
55 for (int i = 0; i < 1024; i++)
58 #pragma omp scan exclusive(r)
64 __attribute__((noipa)) S<T>
69 #pragma omp for reduction (inscan, plus:s)
70 for (int i = 0; i < 1024; i++)
73 #pragma omp scan exclusive(s)
79 __attribute__((noipa)) void
80 baz (S<int> *a, S<int> *b)
82 #pragma omp parallel for reduction (inscan, +:r)
83 for (int i = 0; i < 1024; i++)
86 #pragma omp scan exclusive(r)
91 __attribute__((noipa)) S<int>
95 #pragma omp parallel for reduction (inscan, plus:s)
96 for (int i = 0; i < 1024; i++)
99 #pragma omp scan exclusive(s)
109 for (int i = 0; i < 1024; ++i)
117 if (r.s != 1024 * 1023 / 2)
119 for (int i = 0; i < 1024; ++i)
127 if (bar<int> ().s != 1024 * 1023)
130 for (int i = 0; i < 1024; ++i)
138 if (r.s != 1024 * 1023 / 2)
141 for (int i = 0; i < 1024; ++i)
149 if (qux ().s != 1024 * 1023)
152 for (int i = 0; i < 1024; ++i)