Debian Codegraph @

gcc/testsuite/g++.dg/gomp/member-array-omp.C

raw
1 /* { dg-do compile } */
2 /* { dg-additional-options "-fdump-tree-gimple" } */
3
4 struct Foo {
5 float *a;
6 void init(int N) {
7 a = new float[N];
8 #pragma omp target enter data map(alloc:a[0:N])
9 }
10 };
11 int main() { Foo x; x.init(1024); }
12
13 /* { dg-final { scan-tree-dump {map\(alloc:\*_[0-9]+ \[len: _[0-9]+\]\) map\(attach:this->a \[bias: 0\]\)} "gimple" } } */