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
2003-01-08 Larin Hennessey <larin@science.oregonstate.edu>
[pf3gnuchains/gcc-fork.git]
/
gcc
/
testsuite
/
g++.old-deja
/
g++.jason
/
return2.C
1
// PRMS Id: 5368
2
// Bug: the X temporary in foo() is not destroyed.
3
4
int c = 0;
5
6
struct X {
7
X (int) { c++; }
8
~X() { c--; }
9
};
10
11
struct Y {
12
Y(const X &) { }
13
};
14
15
Y foo() {
16
return X(3);
17
}
18
19
int main()
20
{
21
foo();
22
return c;
23
}