gcc/testsuite/c-c++-common/gomp/depend-2.c
raw| 1 | /* { dg-do compile } */ |
| 2 | /* { dg-options "-fopenmp" } */ |
| 3 | |
| 4 | void bar (int a[10][10][10]); |
| 5 | void |
| 6 | foo (int a[10][10][10], int **b) |
| 7 | { |
| 8 | int c[10][10][10]; |
| 9 | #pragma omp task depend(out: a[2:4][3:][:7], b[1:7][2:8]) |
| 10 | bar (a); |
| 11 | int i = 1, j = 3, k = 2, l = 6; |
| 12 | #pragma omp task depend(in: a[++i:++j][++k:][:++l]) |
| 13 | bar (a); |
| 14 | #pragma omp task depend(out: a[7:2][:][:], c[5:2][:][:]) |
| 15 | { |
| 16 | bar (c); |
| 17 | bar (a); |
| 18 | } |
| 19 | } |