[llvm-commits] CVS: llvm/test/Regression/CodeGen/CBackend/2004-11-13-FunctionPointerCast.llx
Chris Lattner
lattner at cs.uiuc.edu
Sat Nov 13 14:21:30 PST 2004
Changes in directory llvm/test/Regression/CodeGen/CBackend:
2004-11-13-FunctionPointerCast.llx added (r1.1)
---
Log message:
New testcase
---
Diffs of the changes: (+17 -0)
Index: llvm/test/Regression/CodeGen/CBackend/2004-11-13-FunctionPointerCast.llx
diff -c /dev/null llvm/test/Regression/CodeGen/CBackend/2004-11-13-FunctionPointerCast.llx:1.1
*** /dev/null Sat Nov 13 16:21:26 2004
--- llvm/test/Regression/CodeGen/CBackend/2004-11-13-FunctionPointerCast.llx Sat Nov 13 16:21:15 2004
***************
*** 0 ****
--- 1,17 ----
+ ; The CBE should not emit code that casts the function pointer. This causes
+ ; GCC to get testy and insert trap instructions instead of doing the right
+ ; thing. :(
+ ; RUN: llvm-as < %s | llc -march=c | not grep 'external)'
+
+ implementation
+
+ declare void %external(sbyte*)
+
+ int %test(int *%X) {
+ %RV = call int (int*)* cast (void(sbyte*)* %external to int(int*)*)(int* %X)
+ ret int %RV
+ }
+
+
+
+
More information about the llvm-commits
mailing list