diff --git a/test/Transforms/RaiseAllocations/FreeCastConstantExpr.ll b/test/Transforms/RaiseAllocations/FreeCastConstantExpr.ll new file mode 100644 index 00000000000..3b700ffd457 --- /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 +}