gcc/testsuite/g++.dg/gomp/static-component-1.C
raw| 1 | /* { dg-do compile } */ |
| 2 | |
| 3 | /* Types with static members should be mappable. */ |
| 4 | |
| 5 | struct A { |
| 6 | static int x[10]; |
| 7 | }; |
| 8 | |
| 9 | struct B { |
| 10 | A a; |
| 11 | }; |
| 12 | |
| 13 | int |
| 14 | main (int argc, char *argv[]) |
| 15 | { |
| 16 | B *b = new B; |
| 17 | #pragma omp target map(b->a) |
| 18 | ; |
| 19 | B bb; |
| 20 | #pragma omp target map(bb.a) |
| 21 | ; |
| 22 | delete b; |
| 23 | } |