Dead
[official-gcc.git] / gomp-20050608-branch / gcc / testsuite / g++.old-deja / g++.martin / pmf1.C
blob108754b28df3f4d2b69ff65f1af04681da694d5d
1 // { dg-do run  }
2 // Based on a test case by Andrew Bell <andrew.bell@bigfoot.com>
3 // Check for pointer-to-virtual-function calls on 
4 // bases without virtual functions.
6 struct B{};
8 struct D: public B{
9   virtual void foo();
12 void D::foo(){}
14 int main()
16   B *b = new D;
17   void (B::*f)() = static_cast<void (B::*)()>(&D::foo);
18   (b->*f)();