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
Remove old autovect-branch by moving to "dead" directory.
[official-gcc.git]
/
old-autovect-branch
/
gcc
/
testsuite
/
g++.old-deja
/
g++.mike
/
eh51.C
blob
073980a5346737f7d02a0d62860bec08481f319d
1
// { dg-do run { xfail sparc64-*-elf z8k-*-* arm-*-pe } }
2
// { dg-options "-fexceptions" }
3
4
#include <exception>
5
6
void my_unexpected() {
7
throw 42;
8
}
9
10
template <class T> void foo(T) throw (T) { throw "Hi"; }
11
12
main() {
13
std::set_unexpected (my_unexpected);
14
try {
15
foo(1);
16
} catch (int i) {
17
if (i == 42)
18
return 0;
19
}
20
return 1;
21
}