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
PR c++/53549
[pf3gnuchains/gcc-fork.git]
/
gcc
/
testsuite
/
g++.dg
/
eh
/
partial1.C
1
// PR c++/41449
2
// { dg-do run }
3
4
struct A
5
{
6
A() {}
7
A(const A&) { throw 1; }
8
};
9
10
int bs;
11
struct B
12
{
13
B() { ++bs; }
14
B(const B&) { ++bs; }
15
~B() { --bs; }
16
};
17
18
struct C
19
{
20
B b1;
21
A a;
22
B b2;
23
};
24
25
int main()
26
{
27
{
28
B b1, b2;
29
A a;
30
31
try {
32
C c = { b1, a, b2 };
33
} catch (...) {}
34
}
35
if (bs != 0)
36
__builtin_abort ();
37
}