1 // { dg-require-effective-target size32plus }
3 extern "C" void abort ();
9 inline S & operator= (const S &);
27 S::operator= (const S &x)
39 S r, a[1024], b[1024];
41 #pragma omp declare reduction (+: S: omp_out.s += omp_in.s)
42 #pragma omp declare reduction (plus: S: omp_out.s += omp_in.s) initializer (ini (omp_priv))
44 __attribute__((noipa)) void
45 foo (S *a, S *b, S &r)
47 #pragma omp for reduction (inscan, +:r)
48 for (int i = 0; i < 1024; i++)
51 #pragma omp scan inclusive(r)
56 __attribute__((noipa)) S
61 #pragma omp for reduction (inscan, plus:s)
62 for (int i = 0; i < 1024; i++)
65 #pragma omp scan inclusive(s)
71 __attribute__((noipa)) void
72 baz (S *a, S *b, S &r)
74 #pragma omp parallel for reduction (inscan, +:r)
75 for (int i = 0; i < 1024; i++)
78 #pragma omp scan inclusive(r)
83 __attribute__((noipa)) S
87 #pragma omp parallel for reduction (inscan, plus:s)
88 for (int i = 0; i < 1024; i++)
91 #pragma omp scan inclusive(s)
101 for (int i = 0; i < 1024; ++i)
109 if (r.s != 1024 * 1023 / 2)
111 for (int i = 0; i < 1024; ++i)
119 if (bar ().s != 1024 * 1023)
122 for (int i = 0; i < 1024; ++i)
130 if (r.s != 1024 * 1023 / 2)
133 for (int i = 0; i < 1024; ++i)
141 if (qux ().s != 1024 * 1023)
144 for (int i = 0; i < 1024; ++i)