1*aab7dffaSEric Christopher // RUN: %clang_cc1 -emit-llvm %s -o -
2*aab7dffaSEric Christopher 
3*aab7dffaSEric Christopher struct Evil {
4*aab7dffaSEric Christopher  void fun ();
5*aab7dffaSEric Christopher };
6*aab7dffaSEric Christopher int foo();
7*aab7dffaSEric Christopher typedef void (Evil::*memfunptr) ();
8*aab7dffaSEric Christopher static memfunptr jumpTable[] = { &Evil::fun };
9*aab7dffaSEric Christopher 
fun()10*aab7dffaSEric Christopher void Evil::fun() {
11*aab7dffaSEric Christopher  (this->*jumpTable[foo()]) ();
12*aab7dffaSEric Christopher }
13