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
/
ctor1.C
blob
43b735f0b00a5fb79c7a4a8ca82475f45128f9a6
1
// { dg-do run }
2
3
// Copyright (C) 2001 Free Software Foundation, Inc.
4
// Contributed by Nathan Sidwell 26 Dec 2001 <nathan@nathan@codesourcery.com>
5
6
// PR 411
7
8
bool was_f_in_Bar_destroyed=false;
9
10
struct Foo
11
{
12
~Foo()
13
{
14
was_f_in_Bar_destroyed=true;
15
}
16
};
17
18
struct Bar
19
{
20
~Bar()
21
{
22
throw 1;
23
}
24
25
Foo f;
26
};
27
28
int main()
29
{
30
try
31
{
32
Bar f;
33
}
34
catch(int i)
35
{
36
if(was_f_in_Bar_destroyed)
37
{
38
return 0;
39
}
40
}
41
return 1;
42
}