From 5ce35beed56b3df9bff36a15ba4e8a67298e3826 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Mon, 26 Aug 2002 20:49:42 +0000 Subject: [PATCH] New testcase llvm-svn: 3510 --- .../CBackend/2002-08-26-IndirectCallTest.ll | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 llvm/test/Regression/CBackend/2002-08-26-IndirectCallTest.ll diff --git a/llvm/test/Regression/CBackend/2002-08-26-IndirectCallTest.ll b/llvm/test/Regression/CBackend/2002-08-26-IndirectCallTest.ll new file mode 100644 index 000000000000..74f5075b7500 --- /dev/null +++ b/llvm/test/Regression/CBackend/2002-08-26-IndirectCallTest.ll @@ -0,0 +1,14 @@ +; Indirect function call test... found by Joel & Brian +; + +%taskArray = uninitialized global int* + +void %test(int %X) { + %Y = add int %X, -1 ; :1 [#uses=3] + %cast100 = cast int %Y to uint ; [#uses=1] + %gep100 = getelementptr int** %taskArray, uint %cast100 ; [#uses=1] + %fooPtr = load int** %gep100 ; [#uses=1] + %cast101 = cast int* %fooPtr to void (int)* ; [#uses=1] + call void %cast101( int 1000 ) + ret void +}