Mercurial > hg > CbC > CbC_llvm
diff test/Linker/2003-04-26-NullPtrLinkProblem.ll @ 0:95c75e76d11b LLVM3.4
LLVM 3.4
author | Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp> |
---|---|
date | Thu, 12 Dec 2013 13:56:28 +0900 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/Linker/2003-04-26-NullPtrLinkProblem.ll Thu Dec 12 13:56:28 2013 +0900 @@ -0,0 +1,17 @@ +; This one fails because the LLVM runtime is allowing two null pointers of +; the same type to be created! + +; RUN: echo "%%T = type i32" | llvm-as > %t.2.bc +; RUN: llvm-as %s -o %t.1.bc +; RUN: llvm-link %t.1.bc %t.2.bc + +%T = type opaque + +declare %T* @create() + +define void @test() { + %X = call %T* @create( ) ; <%T*> [#uses=1] + %v = icmp eq %T* %X, null ; <i1> [#uses=0] + ret void +} +