Debian Codegraph @

gcc/testsuite/gcc.dg/gomp/bad-array-section-c-1.c

raw
1 /* { dg-do compile } */
2
3 int foo (int *ptr);
4
5 int main()
6 {
7 int arr[20];
8 /* Reject array section as function argument. */
9 #pragma omp target map(foo(arr[3:5]))
10 /* { dg-error {expected '\]' before ':' token} "" { target *-*-* } .-1 } */
11 /* { dg-error {passing argument 1 of 'foo' makes pointer from integer without a cast} "" { target *-*-* } .-2 } */
12 /* { dg-message {sorry, unimplemented: unsupported map expression} "" { target *-*-* } .-3 } */
13 { }
14
15 return 0;
16 }