Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / CodeGenCXX / 2004-03-08-ReinterpretCastCopy.cpp
bloba4411fc468320a75b3926c534c75676fe1062a9f
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 -
4 struct A {
5 virtual void Method() = 0;
6 };
8 struct B : public A {
9 virtual void Method() { }
12 typedef void (A::*fn_type_a)(void);
13 typedef void (B::*fn_type_b)(void);
15 int main(int argc, char **argv)
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;