1 // { dg-do run  }
2 // Origin: Mark Mitchell <mark@codesourcery.com>
3 
4 extern "C" void abort ();
5 
6 int j;
7 
8 struct S {
SS9   S () { ++j; }
SS10   S (const S&) { ++j; }
~SS11   ~S () {
12     if (--j < 0)
13       abort ();
14    }
15 };
16 
17 struct T {
gT18   void g (S) {
19   }
20 };
21 
22 struct U {
23   int i;
24   S s;
25 };
26 
27 U u;
28 
f()29 U f () { return u; }
30 
main()31 int main ()
32 {
33   T t;
34   t.g (f ().s);
35 }
36