c++: prvalue of array type [PR111286]
[official-gcc.git] / gcc / testsuite / c-c++-common / gomp / target-enter-data-1.c
blob4dc51886972aacbc644b2c0caf82d1bd19226744
1 /* { dg-do compile } */
2 /* { dg-additional-options "-fopenmp -fdump-tree-gimple" } */
4 struct bar
6 int num_vectors;
7 double *vectors;
8 };
10 struct foo
12 int num_vectors;
13 struct bar *bars;
14 double **vectors;
17 void func (struct foo *f, int n, int m)
19 #pragma omp target enter data map (to: f->vectors[m][:n])
20 #pragma omp target enter data map (to: f->bars[n].vectors[:m])
21 #pragma omp target enter data map (to: f->bars[n].vectors[:f->bars[n].num_vectors])
24 /* { dg-final { scan-tree-dump-times {map\(struct:\*f \[len: 1\]\) map\(alloc:[a-z0-9\._]+->vectors \[len: 0\]\) map\(to:\*_[0-9]+ \[len: _[0-9]+\]\) map\(attach:[a-z0-9\._]+->vectors \[bias: [^\]]+\]\) map\(attach:\*_[0-9]+ \[bias: [^\]]+\]\)} 1 "gimple" } } */
25 /* { dg-final { scan-tree-dump-times {map\(struct:\*\(f->bars \+ \(sizetype\) \(\([^\)]+\) n \* (?:16|8)\)\) \[len: 1\]\) map\(alloc:[a-z0-9\._]+->vectors \[len: 0\]\) map\(to:\*_[0-9]+ \[len: _[0-9]+\]\) map\(attach:[a-z0-9\._]+->vectors \[bias: [^\]]+\]\)} 2 "gimple" } } */