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
Skip analyzer strndup test on hppa*-*-hpux*
[official-gcc.git]
/
gcc
/
testsuite
/
g++.old-deja
/
g++.mike
/
dyncast3.C
blob
662a37e0d600028f7eef5cc4302a3948db205122
1
// { dg-do run { xfail sparc64-*-elf arm-*-pe**-* } }
2
// { dg-options "-fexceptions -w" }
3
// Ensure that the return type of dynamic_cast is the real type.
4
5
struct B {
6
virtual int f() { }
7
};
8
9
struct D : public B {
10
virtual int f() { }
11
int i;
12
} od;
13
14
main() {
15
B *b=&od;
16
if (dynamic_cast<D*>(b)->i)
17
return 1;
18
return 0;
19
}