OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [gcc/] [testsuite/] [g++.old-deja/] [g++.mike/] [p6610a.C] - Diff between revs 305 and 338

Only display areas with differences | Details | Blame | View Log

Rev 305 Rev 338
// { dg-do run  }
// { dg-do run  }
// prms-id: 6610
// prms-id: 6610
// There is a bug in vtable thunks with multiple/virtual inheritance.
// There is a bug in vtable thunks with multiple/virtual inheritance.
int fail = 1;
int fail = 1;
struct B;
struct B;
struct A { virtual int f(const B*) = 0; int g(const B*); };
struct A { virtual int f(const B*) = 0; int g(const B*); };
int A::g(const B* t) { return f(t); }
int A::g(const B* t) { return f(t); }
struct B : virtual A { B(); int f(const B*); B* B_this; };
struct B : virtual A { B(); int f(const B*); B* B_this; };
B::B() { if (g(this)) fail = 0; }
B::B() { if (g(this)) fail = 0; }
int B::f(const B* t) { return t == this; }
int B::f(const B* t) { return t == this; }
struct C : B { int f(const B*); int x; };
struct C : B { int f(const B*); int x; };
int C::f(const B*) { return 0; }
int C::f(const B*) { return 0; }
int main() { C c; return fail; }
int main() { C c; return fail; }
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.