Debian Codegraph @

gcc/testsuite/gcc.dg/gomp/for-19.c

raw
1 /* Verify that if GOMP_parallel_loop_dynamic_start is used, variables
2 mentioned in the INIT, COND and INCR expressions aren't unnecessarily
3 copied to the omp_fn function. */
4 /* { dg-do compile } */
5 /* { dg-options "-O -fopenmp -fdump-tree-gimple" } */
6
7 void foo (int *a, int i, int j, int k, int l, int m)
8 {
9 #pragma omp parallel for num_threads (3 * i) schedule (dynamic, i * 4)
10 for (j = 0; j <= (6 * l + 4 * k); j++)
11 a[j] = 1;
12 #pragma omp parallel for num_threads (3 * i) schedule (dynamic, i * 4)
13 for (j = m; j <= l; j += (k + l - m))
14 a[j] = 1;
15 }
16
17 /* { dg-final { scan-tree-dump-times "shared\\(a\\)" 2 "gimple" } } */
18 /* { dg-final { scan-tree-dump-times "shared\\(k\\)" 0 "gimple" { xfail *-*-* } } } */
19 /* { dg-final { scan-tree-dump-times "shared\\(l\\)" 0 "gimple" { xfail *-*-* } } } */
20 /* { dg-final { scan-tree-dump-times "shared\\(m\\)" 0 "gimple" { xfail *-*-* } } } */