blob: ee775d043f19f791774e5feae938cb398621fea1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
// Special g++ Options: -fexceptions -w
// excess errors test - XFAIL a29k-*-* sparc64-*-elf sh-*-* arm-*-pe**-*
// Ensure that the return type of dynamic_cast is the real type.
struct B {
virtual f() { }
};
struct D : public B {
virtual f() { }
int i;
} od;
main() {
B *b=&od;
if (dynamic_cast<D*>(b)->i)
return 1;
return 0;
}
|