1 // RUN: %clang_cc1 -triple %itanium_abi_triple -emit-llvm %s -o - 2 3 // FIXME: Don't assert for non-Win32 triples (PR18251). 4 // RUN: %clang_cc1 -triple i686-pc-win32 -fno-rtti -emit-llvm %s -o - 5 6 struct A { 7 virtual void Method() = 0; 8 }; 9 10 struct B : public A { 11 virtual void Method() { } 12 }; 13 14 typedef void (A::*fn_type_a)(void); 15 typedef void (B::*fn_type_b)(void); 16 17 int main(int argc, char **argv) 18 { 19 fn_type_a f = reinterpret_cast<fn_type_a>(&B::Method); 20 fn_type_b g = reinterpret_cast<fn_type_b>(f); 21 B b; 22 (b.*g)(); 23 return 0; 24 } 25