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
Remove old autovect-branch by moving to "dead" directory.
[official-gcc.git]
/
old-autovect-branch
/
gcc
/
testsuite
/
g++.old-deja
/
g++.jason
/
return2.C
blob
132c07929ff2455b0e09064468517c9c8061baf8
1
// { dg-do run }
2
// PRMS Id: 5368
3
// Bug: the X temporary in foo() is not destroyed.
4
5
int c = 0;
6
7
struct X {
8
X (int) { c++; }
9
~X() { c--; }
10
};
11
12
struct Y {
13
Y(const X &) { }
14
};
15
16
Y foo() {
17
return X(3);
18
}
19
20
int main()
21
{
22
foo();
23
return c;
24
}