gcc/testsuite/g++.dg/tree-ssa/pr94224.C
raw| 1 | // PR tree-optimization/94224 |
| 2 | // { dg-do compile } |
| 3 | // { dg-options "-O2 -fnon-call-exceptions -Wno-return-type" } |
| 4 | |
| 5 | void foo (int, int, long); |
| 6 | |
| 7 | static inline int |
| 8 | bar (int &x) |
| 9 | { |
| 10 | x = 0; |
| 11 | } |
| 12 | |
| 13 | struct U |
| 14 | { |
| 15 | int n, p; |
| 16 | long q; |
| 17 | bool *z; |
| 18 | int a; |
| 19 | U () : n (), z (), a (1) {} |
| 20 | ~U () { if (n) foo (p, n, q); } |
| 21 | void baz () { bar (a); } |
| 22 | }; |
| 23 | |
| 24 | struct W |
| 25 | { |
| 26 | U w[2]; |
| 27 | W () { w[0].baz (); } |
| 28 | }; |
| 29 | |
| 30 | void |
| 31 | qux () |
| 32 | { |
| 33 | new W; |
| 34 | } |