1 ; RUN: not llvm-as < %s > /dev/null 2>&1
3 %list = type { i32, ptr }
5 ; This usage is invalid now; instead, objects must be bitcast to ptr for input
6 ; to the gc intrinsics.
7 declare void @llvm.gcwrite(ptr, ptr, ptr)
9 define ptr @cons(i32 %hd, ptr %tl) gc "example" {
10 %tmp = call ptr @gcalloc(i32 bitcast(ptr getelementptr(%list, ptr null, i32 1) to i32))
12 store i32 %hd, ptr %tmp
14 call void @llvm.gcwrite(ptr %tl, ptr %tmp, ptr %tmp)
19 declare ptr @gcalloc(i32)