2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.jason / cleanup.C
blobadf824622235153453394c7d14844c053e27e589
1 // { dg-do run  }
2 // Bug: continue over object decl calls destructor but not constructor.
4 int c = 0;
5 int d = 0;
6 extern "C" int printf(const char *,...);
8 class Foo {
9 public:
10   Foo(){ c++; }
11   ~Foo(){ d++; }
14 int main()
16   for(int i=0;i<2;i++){
17     continue;
18     Foo bar;
19   }
20   printf ("%d %d\n", c, d);
21   if (c == d && d == 0)
22     return 0;
23   return 1;