repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git]
/
gcc
/
testsuite
/
g++.old-deja
/
g++.mike
/
eh24.C
blob
829819b396d71569b712ddd6386c872bf1e82e29
1
// { dg-do run { xfail sparc64-*-elf arm-*-pe } }
2
// { dg-options "-fexceptions" }
3
4
int fail = 0;
5
6
struct A {
7
int ok;
8
A() {
9
ok = 1;
10
}
11
~A() {
12
if (! ok)
13
fail = 1;
14
ok = 0;
15
}
16
};
17
18
main() {
19
try {
20
try {
21
A a;
22
throw 1.0;
23
} catch (double i) {
24
A a1;
25
throw 1; // make sure both a1 and a2 are not destroyed when we throw!
26
} catch (int i) {
27
A a2;
28
throw 1.0;
29
}
30
} catch (int i) {
31
}
32
return fail;
33
}