repo.or.cz
/
official-gcc
/
graphite-test-results.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Remove outermost loop parameter.
[official-gcc/graphite-test-results.git]
/
gcc
/
testsuite
/
g++.dg
/
cpp0x
/
rvo.C
blob
b52ce7495db3980c5cc5566cdff01a393b879e1d
1
// { dg-do "run" }
2
// { dg-options "-std=c++0x" }
3
// Contributed by Sylvain Pion
4
static int rvalue_constructions = 0;
5
6
struct A {
7
A () { }
8
A (const A&) { }
9
A (A&&) { ++rvalue_constructions; }
10
~A () { }
11
};
12
13
A f() { return A(); }
14
15
extern "C" {
16
void abort(void);
17
}
18
19
int main()
20
{
21
A c = f();
22
23
if (rvalue_constructions != 0)
24
abort();
25
}