URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
Subversion Repositories openrisc_2011-10-31
[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc2/] [gcc/] [testsuite/] [g++.old-deja/] [g++.mike/] [p10849a.C] - Rev 305
Go to most recent revision | Compare with Previous | Blame | View Log
// { dg-do run }
// prms-id: 10849
struct A
{
int comm;
A(int i) : comm(i) { }
};
struct S1 { char c1; };
struct B : public S1, public A
{
B(int i) : A(i) { }
};
struct C : public A
{
C(int i) : A(i) { }
};
struct D : public B, public C
{
virtual int g() {
int D::*pmd = (int C::*)&C::comm;
return (this->*pmd) == 42;
}
D() : B(41), C(42) { }
} d;
int main() {
if (! d.g())
return 1;
}
Go to most recent revision | Compare with Previous | Blame | View Log