From b8d989e0558b0f39f1095db9b0317c9df4390035 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Mon, 8 Dec 2003 06:18:37 +0000 Subject: [PATCH] New testcase for PR165 llvm-svn: 10314 --- .../C++Frontend/2003-12-08-ArrayOfPtrToMemberFunc.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 llvm/test/Regression/C++Frontend/2003-12-08-ArrayOfPtrToMemberFunc.cpp diff --git a/llvm/test/Regression/C++Frontend/2003-12-08-ArrayOfPtrToMemberFunc.cpp b/llvm/test/Regression/C++Frontend/2003-12-08-ArrayOfPtrToMemberFunc.cpp new file mode 100644 index 000000000000..b1677bc203d5 --- /dev/null +++ b/llvm/test/Regression/C++Frontend/2003-12-08-ArrayOfPtrToMemberFunc.cpp @@ -0,0 +1,10 @@ +struct Evil { + void fun (); +}; +int foo(); +typedef void (Evil::*memfunptr) (); +static memfunptr jumpTable[] = { &Evil::fun }; + +void Evil::fun() { + (this->*jumpTable[foo()]) (); +}