URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Subversion Repositories openrisc
[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.old-deja/] [g++.mike/] [p6610b.C] - Rev 699
Compare with Previous | Blame | View Log
// { dg-do run }
// prms-id: 6610
int fail = 1;
struct B;
struct A { virtual int f(const B*) = 0; int g(const B*); };
int A::g(const B* t) { return f(t); }
struct B : virtual A { int f(const B*); B* B_this; };
int B::f(const B* t) { return t == this; }
struct S1 { };
struct C : virtual S1, virtual B, virtual A { C(); };
C::C() { if (g(this)) fail = 0; }
struct D : virtual B, virtual A, C { };
int main() { D d; return fail; }