repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Merge reload-branch up to revision 101000
[official-gcc.git]
/
gcc
/
testsuite
/
g++.old-deja
/
g++.other
/
dtor6.C
blob
f8c1d8563cb6bf9ba817ffd18e5c108f6399b090
1
// { dg-do run }
2
// Origin: Mark Mitchell <mark@codesourcery.com>
3
4
extern "C" void abort ();
5
6
int count;
7
8
struct S
9
{
10
S ();
11
S (const S&);
12
~S ();
13
14
int i;
15
};
16
17
S::S ()
18
{
19
i = count++;
20
}
21
22
S::S (const S&)
23
{
24
i = count++;
25
}
26
27
S::~S ()
28
{
29
if (--count != i)
30
abort ();
31
}
32
33
void f (S, S)
34
{
35
}
36
37
int main ()
38
{
39
{
40
S s;
41
f (s, s);
42
}
43
return count != 0;
44
}
45