diff options
author | Nick Lewycky <nicholas@mxc.ca> | 2008-12-27 16:20:53 +0000 |
---|---|---|
committer | Nick Lewycky <nicholas@mxc.ca> | 2008-12-27 16:20:53 +0000 |
commit | 047a53cc017762eb7e9cb9551bc868d3f7e436af (patch) | |
tree | cc003289d2b8270b5e77edd9fe94c87f0e599269 /test | |
parent | a9e3b588e0071441a514d4abdfc08a01e2faa620 (diff) | |
download | external_llvm-047a53cc017762eb7e9cb9551bc868d3f7e436af.zip external_llvm-047a53cc017762eb7e9cb9551bc868d3f7e436af.tar.gz external_llvm-047a53cc017762eb7e9cb9551bc868d3f7e436af.tar.bz2 |
Check that the function prototypes are correct before assuming that the
parameters are pointers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61451 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r-- | test/Analysis/Andersens/2008-12-27-BuiltinWrongType.ll | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/Analysis/Andersens/2008-12-27-BuiltinWrongType.ll b/test/Analysis/Andersens/2008-12-27-BuiltinWrongType.ll new file mode 100644 index 0000000..5f5da74 --- /dev/null +++ b/test/Analysis/Andersens/2008-12-27-BuiltinWrongType.ll @@ -0,0 +1,19 @@ +; RUN: llvm-as < %s | opt -anders-aa +; PR3262 + +@.str15 = external global [3 x i8] ; <[3 x i8]*> [#uses=1] + +declare i8* @strtok(...) +declare i8* @memmove(...) + +define void @test1(i8* %want1) nounwind { +entry: + %0 = call i8* (...)* @strtok(i32 0, i8* getelementptr ([3 x i8]* @.str15, i32 0, i32 0)) nounwind ; <i8*> [#uses=0] + unreachable +} + +define void @test2() nounwind { +entry: + %0 = call i8* (...)* @memmove() + unreachable +} |