Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/c-c++-common/gomp/map-2.c @ 111:04ced10e8804
gcc 7
author | kono |
---|---|
date | Fri, 27 Oct 2017 22:46:09 +0900 |
parents | |
children |
line wrap: on
line source
/* { dg-do compile } */ /* { dg-options "-fopenmp" } */ void foo (int *p, int (*q)[10], int r[10], int s[10][10]) { int a[10], b[10][10]; #pragma omp target map (tofrom: p[-1:2]) ; #pragma omp target map (tofrom: q[-1:2][0:10]) ; #pragma omp target map (tofrom: q[-1:2][-2:10]) /* { dg-error "negative low bound in array section in" } */ ; #pragma omp target map (tofrom: r[-1:2]) ; #pragma omp target map (tofrom: s[-1:2][:]) ; #pragma omp target map (tofrom: s[-1:2][-2:10]) /* { dg-error "negative low bound in array section in" } */ ; #pragma omp target map (tofrom: a[-1:2]) /* { dg-error "negative low bound in array section in" } */ ; #pragma omp target map (tofrom: b[-1:2][0:]) /* { dg-error "negative low bound in array section in" } */ ; #pragma omp target map (tofrom: b[1:2][-2:10]) /* { dg-error "negative low bound in array section in" } */ ; #pragma omp target map (tofrom: p[2:-3]) /* { dg-error "negative length in array section in" } */ ; #pragma omp target map (tofrom: q[2:-3][:]) /* { dg-error "negative length in array section in" } */ ; #pragma omp target map (tofrom: q[2:3][0:-1]) /* { dg-error "negative length in array section in" } */ ; #pragma omp target map (tofrom: r[2:-5]) /* { dg-error "negative length in array section in" } */ ; #pragma omp target map (tofrom: s[2:-5][:]) /* { dg-error "negative length in array section in" } */ ; #pragma omp target map (tofrom: s[2:5][0:-4]) /* { dg-error "negative length in array section in" } */ ; #pragma omp target map (tofrom: a[2:-5]) /* { dg-error "negative length in array section in" } */ ; #pragma omp target map (tofrom: b[2:-5][0:10]) /* { dg-error "negative length in array section in" } */ ; #pragma omp target map (tofrom: b[2:5][0:-4]) /* { dg-error "negative length in array section in" } */ ; }