New test case.

From-SVN: r29561
This commit is contained in:
Martin v. Löwis 1999-09-21 19:51:16 +00:00
parent 118a6ea134
commit 54965141fb

@ -0,0 +1,21 @@
// Special g++ Options: -Wno-pmf-conversions
// Test conversion of pointers to virtual member functions to
// pointers to non-member functions.
struct A{
int i;
A::A():i(1){}
virtual void foo();
}a;
void A::foo()
{
i = 0;
}
int main()
{
void (*f)(A*) = (void(*)(A*))(&A::foo);
f(&a);
return a.i;
}