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
[31/77] Use scalar_int_mode for move2add
[official-gcc.git]
/
gcc
/
testsuite
/
g++.old-deja
/
g++.mike
/
eh48.C
blob
d9caf61b430ecb8d67c1c6c805086e223759fd67
1
// { dg-do run { xfail sparc64-*-elf arm-*-pe } }
2
// { dg-options "-fexceptions" }
3
4
#include <exception>
5
#include <stdlib.h>
6
7
using std::uncaught_exception;
8
class A {
9
public:
10
~A() {
11
if (uncaught_exception ())
12
exit (0);
13
}
14
};
15
16
int main() {
17
if (uncaught_exception ())
18
return 1;
19
try {
20
throw "";
21
} catch (...) {
22
if (uncaught_exception ())
23
return 1;
24
}
25
if (uncaught_exception ())
26
return 1;
27
try {
28
A a;
29
throw "";
30
} catch (...) {
31
return 1;
32
}
33
return 1;
34
}