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
/
dtor7.C
blob
c212d947662562c28101ab33fcff9b438406c050
1
// { dg-do run }
2
// { dg-options "-O2" }
3
// Origin: Mark Mitchell <mitchell@codesourcery.com>
4
5
int i;
6
int j;
7
8
struct A
9
{
10
A ();
11
A (const A&);
12
~A ();
13
};
14
15
A::A ()
16
{
17
++i;
18
}
19
20
A::A (const A&)
21
{
22
++i;
23
}
24
25
A::~A ()
26
{
27
--i;
28
}
29
30
A f ()
31
{
32
return A ();
33
}
34
35
void g (const A&)
36
{
37
}
38
39
int main ()
40
{
41
g (f ());
42
return i;
43
}