2018-11-09 Jakub Jelinek <jakub@redhat.com>
[official-gcc.git] / gcc / testsuite / gcc.dg / gomp / workshare-reduction-8.c
blobb4cc0df9dfbbf45acb477928db5895c9e9ac1dc6
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fopenmp -fdump-tree-optimized" } */
3 /* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_start \[^\n\r]*, (?:2147483649|-2147483647), 0, 0B, 0B, " 1 "optimized" } } */
4 /* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_end " 1 "optimized" } } */
5 /* { dg-final { scan-tree-dump-not "__builtin_GOMP_loop\[^\n\r]*_next " "optimized" } } */
6 /* { dg-final { scan-tree-dump-times "__builtin_GOMP_workshare_task_reduction_unregister \\(0\\)" 1 "optimized" } } */
7 /* { dg-final { scan-tree-dump-times "__builtin_GOMP_parallel " 1 "optimized" } } */
9 int j;
10 void bar (int *);
12 void
13 foo (int a, int b, int c)
15 int i;
16 #pragma omp parallel
17 #pragma omp for reduction (task, *: j) schedule (static, 2)
18 for (i = a; i < b; i += c)
20 j++;
21 bar (&j);