1 // RUN: %clang_cc1 -triple %itanium_abi_triple -emit-llvm %s -o - 2 // RUN: %clang_cc1 -triple %ms_abi_triple -fno-rtti -emit-llvm %s -o - 3 4 struct A { 5 virtual void Method() = 0; 6 }; 7 8 struct B : public A { MethodB9 virtual void Method() { } 10 }; 11 12 typedef void (A::*fn_type_a)(void); 13 typedef void (B::*fn_type_b)(void); 14 main(int argc,char ** argv)15int main(int argc, char **argv) 16 { 17 fn_type_a f = reinterpret_cast<fn_type_a>(&B::Method); 18 fn_type_b g = reinterpret_cast<fn_type_b>(f); 19 B b; 20 (b.*g)(); 21 return 0; 22 } 23