1 /* { dg-do compile } */ 2 /* { dg-options "-fopenmp" } */ 3 4 void bar (int a[10][10][10]); 5 void foo(int a[10][10][10],int ** b,int x)6foo (int a[10][10][10], int **b, int x) 7 { 8 int c[10][10][10]; 9 #pragma omp task depend(out: a[2:4][3:0][:7]) /* { dg-error "zero length array section" } */ 10 bar (a); 11 #pragma omp task depend(inout: b[:7][0:0][:0]) /* { dg-error "zero length array section" } */ 12 bar (a); 13 #pragma omp task depend(in: c[:][:][10:]) /* { dg-error "zero length array section" } */ 14 bar (c); 15 #pragma omp task depend(out: a[2:4][3:0][:x]) /* { dg-error "zero length array section" } */ 16 bar (a); 17 #pragma omp task depend(inout: b[:x][0:0][:0]) /* { dg-error "zero length array section" } */ 18 bar (a); 19 #pragma omp task depend(in: c[:][x-2:x][10:]) /* { dg-error "zero length array section" } */ 20 bar (c); 21 } 22