URL
https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk
Subversion Repositories openrisc_me
[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [g++.old-deja/] [g++.mike/] [p10849a.C] - Rev 414
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