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
Dead
[official-gcc.git]
/
gomp-20050608-branch
/
gcc
/
testsuite
/
g++.old-deja
/
g++.mike
/
dyncast1.C
blob
8764acddec05b561c603028991aeec6b0f3fc150
1
// { dg-do run { xfail sparc64-*-elf arm-*-pe } }
2
// { dg-options "-fexceptions -w" }
3
4
#include <typeinfo>
5
6
struct B {
7
virtual int f() { }
8
};
9
10
struct D {
11
virtual int f() { }
12
};
13
14
main() {
15
B b;
16
try {
17
(void)dynamic_cast<D&>(b);
18
} catch (std::bad_cast) {
19
return 0;
20
}
21
return 1;
22
}