gcc/testsuite/g++.dg/gomp/pr88733.C
raw| 1 | // PR lto/88733 |
| 2 | // { dg-do compile } |
| 3 | // { dg-additional-options "-flto -ffat-lto-objects" { target lto } } |
| 4 | |
| 5 | struct A { int f; } a; |
| 6 | |
| 7 | __attribute__((noipa)) void |
| 8 | bar (A **x, int) |
| 9 | { |
| 10 | x[0] = &a; |
| 11 | } |
| 12 | |
| 13 | int |
| 14 | foo (int n) |
| 15 | { |
| 16 | int g; |
| 17 | A *j[n]; |
| 18 | bar (j, n); |
| 19 | #pragma omp parallel |
| 20 | #pragma omp single |
| 21 | g = j[0]->f; |
| 22 | return g; |
| 23 | } |
| 24 | |
| 25 | int |
| 26 | main () |
| 27 | { |
| 28 | foo (0); |
| 29 | } |