blob: 22fcd8d9c704821e3601402e5851ee95a8fb7628 [file] [log] [blame]
/* { dg-do compile } */
/* { dg-options "-fopenmp" } */
void bar (int a[10][10][10]);
void
foo (int a[10][10][10], int **b, int x)
{
int c[10][10][10];
#pragma omp task depend(out: a[2:4][3:0][:7]) /* { dg-error "zero length array section" } */
bar (a);
#pragma omp task depend(inout: b[:7][0:0][:0]) /* { dg-error "zero length array section" } */
bar (a);
#pragma omp task depend(in: c[:][:][10:]) /* { dg-error "zero length array section" } */
bar (c);
#pragma omp task depend(out: a[2:4][3:0][:x]) /* { dg-error "zero length array section" } */
bar (a);
#pragma omp task depend(inout: b[:x][0:0][:0]) /* { dg-error "zero length array section" } */
bar (a);
#pragma omp task depend(in: c[:][x-2:x][10:]) /* { dg-error "zero length array section" } */
bar (c);
}