blob: ff9b593663674840376a2d5daae73e8addaf755d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
// { dg-do run }
// 981203 bkoz
// g++/15822
#include <assert.h>
static unsigned int gcount;
struct playahermosa {
playahermosa() { ++gcount; }
playahermosa(const playahermosa &) { ++gcount; }
~playahermosa() { --gcount; }
};
struct playacoco {
playacoco(const playahermosa& = playahermosa()) { } //create a temporary
};
void foo(playacoco *) { }
int main()
{
playacoco bar[2];
foo(bar);
assert (gcount == 0);
return 0;
}
|