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
* c-common.h (COMPOUND_STMT_BODY_BLOCK): New macro.
[pf3gnuchains/gcc-fork.git]
/
gcc
/
testsuite
/
g++.dg
/
eh
/
dtor1.C
1
// Test that a fully-constructed base is destroyed before transferring
2
// control to the handler of a function-try-block.
3
4
// { dg-do run }
5
6
int ad;
7
int r;
8
9
struct A {
10
~A() { ++ad; }
11
};
12
13
struct B: public A {
14
~B();
15
};
16
17
B::~B ()
18
try
19
{
20
throw 1;
21
}
22
catch (...)
23
{
24
if (!ad)
25
r = 1;
26
return;
27
}
28
29
int main ()
30
{
31
{ B b; }
32
return r;
33
}