1 /* { dg-do compile } */
2 /* { dg-options "-fopenmp-simd -fdump-tree-original" } */
5 int a[1024] __attribute__((aligned (32))) = { 1 };
7 #pragma omp declare reduction (+:struct S:omp_out.s += omp_in.s)
8 #pragma omp declare reduction (foo:struct S:omp_out.s += omp_in.s)
9 #pragma omp declare reduction (foo:int:omp_out += omp_in)
11 __attribute__((noinline, noclone)) int
17 #pragma omp simd aligned(a : 32) reduction(+:s) reduction(foo:t, u)
18 for (i = 0; i < 1024; i++)
25 if (t.s != s.s || u != s.s)
31 void bar(int n, float *a, float *b)
34 #pragma omp parallel for simd num_threads(4) safelen(64)
35 for (i = 0; i < n ; i++)
39 /* { dg-final { scan-tree-dump-times "pragma omp simd reduction\\(u\\) reduction\\(t\\) reduction\\(\\+:s\\) aligned\\(a:32\\)" 1 "original" } } */
40 /* { dg-final { scan-tree-dump-times "pragma omp simd safelen\\(64\\)" 1 "original" } } */
41 /* { dg-final { scan-tree-dump-not "omp parallel" "original" } } */
42 /* { dg-final { scan-tree-dump-not "omp for" "original" } } */