blob: b87e7869ed72c629c3ed16bea11b80a63d216743 [file] [log] [blame]
Dan Gohman0d4bbf22009-08-25 15:38:29 +00001// RUN: %llvmgxx -S %s -o - | llvm-as -o /dev/null
Tanya Lattnerd9a3ceb2004-11-06 22:29:57 +00002
Chris Lattnerb8d989e2003-12-08 06:18:37 +00003struct Evil {
4 void fun ();
5};
6int foo();
7typedef void (Evil::*memfunptr) ();
8static memfunptr jumpTable[] = { &Evil::fun };
9
10void Evil::fun() {
11 (this->*jumpTable[foo()]) ();
12}