URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Subversion Repositories openrisc
[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.old-deja/] [g++.mike/] [dyncast9.C] - Rev 699
Compare with Previous | Blame | View Log
// { dg-do run }
class S1 { int i; };
class S2 { int i; };
class VB {
public:
virtual void foo() { }
};
class D : public S1, virtual public VB {
} d;
class E : public S2, public D {
} e;
int main() {
return (char *)&e - (char *)dynamic_cast<E*>((D*)&e);
}