diff options
-rw-r--r-- | test/Transforms/RaiseAllocations/FreeCastConstantExpr.ll | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/Transforms/RaiseAllocations/FreeCastConstantExpr.ll b/test/Transforms/RaiseAllocations/FreeCastConstantExpr.ll new file mode 100644 index 0000000000..3b700ffd45 --- /dev/null +++ b/test/Transforms/RaiseAllocations/FreeCastConstantExpr.ll @@ -0,0 +1,10 @@ +; This situation can occur due to the funcresolve pass. +; +; RUN: llvm-as < %s | opt -raiseallocs | llvm-dis | not grep call + +declare void %free(sbyte*) + +void %test(int *%P) { + call void(int*)* cast (void(sbyte*)* %free to void(int*)*)(int* %P) + ret void +} |