1 // { dg-do run  }
2 // { dg-options "-O1" }
3 // Origin: Mark Mitchell <mark@codesourcery.com>
4 
5 int result;
6 
7 struct S
8 {
9   S ();
10   S (const S&);
11   ~S ();
12 
13   int i;
14   double d[18];
15 };
16 
17 S* s;
18 
S()19 S::S ()
20 {
21   s = this;
22 }
23 
~S()24 S::~S ()
25 {
26   if (s != this)
27     result = 1;
28 }
29 
f()30 inline S f ()
31 {
32   return S ();
33 }
34 
main()35 int main ()
36 {
37   f ();
38   return result;
39 }
40