diff options
Diffstat (limited to 'test/CodeGen/Generic/GC/badreadproto.ll')
-rw-r--r-- | test/CodeGen/Generic/GC/badreadproto.ll | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/CodeGen/Generic/GC/badreadproto.ll b/test/CodeGen/Generic/GC/badreadproto.ll new file mode 100644 index 0000000..4fe90b9 --- /dev/null +++ b/test/CodeGen/Generic/GC/badreadproto.ll @@ -0,0 +1,13 @@ +; RUN: not llvm-as < %s >& /dev/null + + %list = type { i32, %list* } + +; This usage is invalid now; instead, objects must be bitcast to i8* for input +; to the gc intrinsics. +declare %list* @llvm.gcread(%list*, %list**) + +define %list* @tl(%list* %l) gc "example" { + %hd.ptr = getelementptr %list* %l, i32 0, i32 0 + %hd = call %list* @llvm.gcread(%list* %l, %list** %hd.ptr) + ret i32 %tmp +} |