☰
Debian Codegraph
@
15:15.3.rel1-2
15:15.3.rel1-1
/
/
gcc
/
testsuite
/
g++.dg
/
eh
/
throw5.C
☽
☼
gcc/testsuite/g++.dg/eh/throw5.C
code
plain
raw
1
// PR c++/57533
2
// { dg-do run { target c++11 } }
3
4
struct X
5
{
6
bool moved = false;
7
8
X() = default;
9
X(const X&) = default;
10
X(X&& x) { x.moved = true; }
11
};
12
13
int main()
14
{
15
X x;
16
try {
17
throw x;
18
}
19
catch(...) {
20
}
21
if (x.moved)
22
__builtin_abort();
23
}