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/] [pmf8.C] - Rev 414
Go to most recent revision | Compare with Previous | Blame | View Log
// { dg-do run }
int fail;
class A *ptr_a;
class A {
public:
char space1[24];
virtual void foo() {
if (this != ptr_a)
fail = 1;
}
};
class Space {
char space2[36];
};
class B : public Space, public A {
} b;
void (B::*pmf1)() = &A::foo;
void (A::*pmf2)() = &A::foo;
int main() {
ptr_a = &b;
(b .* (void (B::*) ()) &A::foo) ();
(b .* pmf1) ();
(b .* pmf2) ();
(b .* &A::foo) ();
return fail;
}
Go to most recent revision | Compare with Previous | Blame | View Log