FSF GCC merge 02/23/03
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.mike / p783a.C
blob167c9d9d23fcd6068386bb0c0f3b8f3fb34e6c29
1 // Copying into an object directly is a lose according to tiemann.
2 // Deleting an object many times is a lose.
3 // prms-id: 783
5 extern "C" int printf (const char *, ...);
6 extern "C" void exit (int);
8 class C {
9   int i;
10 public:
11   C() {
12     i = 1;
13   }
14   ~C() {
15     if (i != 1) {
16       exit(1);
17     }
18     i = 0;
19   }
22 int main(int argc, char**argv) {
23   C c;
24   c = C();
25   return 0;