OSDN Git Service
(root)
/
pf3gnuchains
/
gcc-fork.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
* g++.old-deja/g++.other/thunk1.C: New test.
[pf3gnuchains/gcc-fork.git]
/
gcc
/
testsuite
/
g++.old-deja
/
g++.other
/
dtor6.C
1
// Origin: Mark Mitchell <mark@codesourcery.com>
2
3
extern "C" void abort ();
4
5
int count;
6
7
struct S
8
{
9
S ();
10
S (const S&);
11
~S ();
12
13
int i;
14
};
15
16
S::S ()
17
{
18
i = count++;
19
}
20
21
S::S (const S&)
22
{
23
i = count++;
24
}
25
26
S::~S ()
27
{
28
if (--count != i)
29
abort ();
30
}
31
32
void f (S, S)
33
{
34
}
35
36
int main ()
37
{
38
{
39
S s;
40
f (s, s);
41
}
42
return count != 0;
43
}
44