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++.other/] [ptrmem9.C] - Rev 384
Compare with Previous | Blame | View Log
// { dg-do run }
// Test that const-correctness is observed when using pointers-to-members.
struct A {
int f () { return 1; }
int f () const { return 0; }
};
struct B {
A a;
B() { }
};
int main ()
{
A B::*bm = &B::a;
const B b;
return (b.*bm).f ();
}