repo.or.cz
/
netbsd-mini2440.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
No empty .Rs/.Re
[netbsd-mini2440.git]
/
gnu
/
dist
/
gcc4
/
gcc
/
testsuite
/
g++.dg
/
eh
/
dtor1.C
blob
4fafdde24d206a1dedc53db8bbc298b7b30f4268
1
// PR c++/411
2
3
// Test that a fully-constructed base is destroyed before transferring
4
// control to the handler of a function-try-block.
5
6
// { dg-do run }
7
8
int ad;
9
int r;
10
11
struct A {
12
~A() { ++ad; }
13
};
14
15
struct B: public A {
16
~B();
17
};
18
19
B::~B ()
20
try
21
{
22
throw 1;
23
}
24
catch (...)
25
{
26
if (!ad)
27
r = 1;
28
return;
29
}
30
31
int main ()
32
{
33
{ B b; }
34
return r;
35
}