2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.other / dtor11.C
blobd4d61d25b4439f15e28217f102d53a6945c630d6
1 // { dg-do run  }
2 // Origin: Mark Mitchell <mark@codesourcery.com>
4 extern "C" void abort ();
6 int j;
8 struct S {
9   S () { ++j; }
10   S (const S&) { ++j; }
11   ~S () {
12     if (--j < 0)
13       abort ();
14    }
17 struct T {
18   void g (S) {
19   };
22 struct U {
23   int i;
24   S s;
27 U u;
29 U f () { return u; }
31 int main ()
33   T t;
34   t.g (f ().s);