2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.benjamin / 15822.C
blobff9b593663674840376a2d5daae73e8addaf755d
1 // { dg-do run  }
2 // 981203 bkoz
3 // g++/15822
5 #include <assert.h>
7 static unsigned int gcount;
9 struct playahermosa {
10   playahermosa() { ++gcount; }
11   playahermosa(const playahermosa &) { ++gcount; }
12   ~playahermosa() { --gcount; }
15 struct playacoco {
16   playacoco(const playahermosa& = playahermosa()) {  } //create a temporary
19 void foo(playacoco *) { }
21 int main() 
23    playacoco bar[2];
24    foo(bar);
25    assert (gcount == 0);
27    return 0;