Debian Codegraph @

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

raw
1 /* { dg-do compile } */
2
3 int x;
4
5 int main()
6 {
7 int arr1[40];
8 int arr2[40];
9 #pragma omp target map(arr1[arr2[4:5]:arr2[6:7]])
10 /* { dg-error {low bound 'arr2\[4:5\]' of array section does not have integral type} "" { target *-*-* } .-1 } */
11 { }
12 #pragma omp target map(arr1[arr2[:1]:arr2[6:1]])
13 /* { dg-error {low bound 'arr2\[:1\]' of array section does not have integral type} "" { target *-*-* } .-1 } */
14 { }
15 #pragma omp target map(arr1[x:arr2[6:1]])
16 /* { dg-error {length 'arr2\[6:1\]' of array section does not have integral type} "" { target *-*-* } .-1 } */
17 { }
18
19 return 0;
20 }
21