gcc/testsuite/gcc.dg/gomp/bad-array-section-c-2.c
raw| 1 | /* { dg-do compile } */ |
| 2 | |
| 3 | int main() |
| 4 | { |
| 5 | int arr[20]; |
| 6 | /* Reject array section in statement expression. */ |
| 7 | #pragma omp target map( ({ int x = 5; arr[0:x]; }) ) |
| 8 | /* { dg-error {expected '\]' before ':' token} "" { target *-*-* } .-1 } */ |
| 9 | /* { dg-message {sorry, unimplemented: unsupported map expression} "" { target *-*-* } .-2 } */ |
| 10 | { } |
| 11 | |
| 12 | return 0; |
| 13 | } |