2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.other / dtor6.C
blobf8c1d8563cb6bf9ba817ffd18e5c108f6399b090
1 // { dg-do run  }
2 // Origin: Mark Mitchell <mark@codesourcery.com>
4 extern "C" void abort ();
6 int count;
8 struct S
10   S ();
11   S (const S&);
12   ~S ();
14   int i;
17 S::S ()
19   i = count++;
22 S::S (const S&)
24   i = count++;
27 S::~S ()
29   if (--count != i)
30     abort ();
33 void f (S, S)
37 int main ()
39   {
40     S s;
41     f (s, s);
42   }
43   return count != 0;