Checkin testcase for PR261
[oota-llvm.git] / test / C++Frontend / 2004-03-08-ReinterpretCastCopy.cpp
1 struct A {
2   virtual void Method() = 0;
3 };
4
5 struct B : public A {
6   virtual void Method() { }
7 };
8
9 typedef void (A::*fn_type_a)(void);
10 typedef void (B::*fn_type_b)(void);
11
12 int main(int argc, char **argv)
13 {
14   fn_type_a f = reinterpret_cast<fn_type_a>(&B::Method);
15   fn_type_b g = reinterpret_cast<fn_type_b>(f);
16   B b;
17   (b.*g)();
18   return 0;
19 }