Debian Codegraph @

gcc/testsuite/g++.dg/gomp/bad-array-section-6.C

raw
1 // { dg-do compile }
2
3 bool partly = false;
4
5 template<typename T>
6 void foo()
7 {
8 T arr[20];
9 #pragma omp target map(partly ? arr[5:5] : arr)
10 // { dg-message {sorry, unimplemented: unsupported map expression '\(partly \? \(\(int\*\)\(\& arr\[5:5\]\)\) : \(\(int\*\)\(\& arr\)\)\)'} "" { target *-*-* } .-1 }
11 { }
12 }
13
14 int main()
15 {
16 int arr[20];
17 #pragma omp target map(partly ? arr[5:5] : arr)
18 // { dg-message {sorry, unimplemented: unsupported map expression '\(partly \? \(\(int\*\)\(\& arr\[5:5\]\)\) : \(\(int\*\)\(\& arr\)\)\)'} "" { target *-*-* } .-1 }
19 { }
20
21 foo<int> ();
22
23 return 0;
24 }