URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Subversion Repositories openrisc
[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.old-deja/] [g++.bugs/] [900212_03.C] - Rev 706
Go to most recent revision | Compare with Previous | Blame | View Log
// { dg-do run }
// g++ 1.36.1 bug 900212_03
// g++ segfaults on any attempt to use the ->* operator.
// Cfront 2.0 passes this test.
// keywords: member pointers, operator->*
struct struct0 {
int data_member;
void function_member ();
};
void struct0::function_member ()
{
}
int i;
int struct0::*dmp;
void (struct0::*fmp) ();
struct0 *ptr;
void global_function_0 ()
{
i = ptr->*dmp; // causes segfault
(ptr->*fmp) (); // causes segfault
// i = ptr->*(&struct0::data_member); // too complicated for cfront
// (ptr->*(&struct0::function_member)) (); // too complicated for cfront
}
int main () { return 0; }
Go to most recent revision | Compare with Previous | Blame | View Log