view gcc/testsuite/c-c++-common/gomp/depend-3.c @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents 04ced10e8804
children
line wrap: on
line source

/* { 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);
}