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
bar(int & x)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;
UU19   U () : n (), z (), a (1) {}
~UU20   ~U () { if (n) foo (p, n, q); }
bazU21   void baz () { bar (a); }
22 };
23 
24 struct W
25 {
26   U w[2];
WW27   W () { w[0].baz (); }
28 };
29 
30 void
qux()31 qux ()
32 {
33   new W;
34 }
35