31 lines · plain
1; RUN: not llvm-as -disable-output %s 2>&1 | FileCheck %s2 3; CHECK: Attribute 'writable' applied to incompatible type!4; CHECK-NEXT: ptr @not_pointer5define void @not_pointer_writable(i32 writable %arg) {6 ret void7}8 9; CHECK: Attributes writable and readnone are incompatible!10; CHECK-NEXT: ptr @writable_readnone11define void @writable_readnone(ptr writable readnone %arg) {12 ret void13}14 15; CHECK: Attributes writable and readonly are incompatible!16; CHECK-NEXT: ptr @writable_readonly17define void @writable_readonly(ptr writable readonly %arg) {18 ret void19}20 21; CHECK: Attribute writable and memory without argmem: write are incompatible!22; CHECK-NEXT: ptr @writable_memory_argmem_read23define void @writable_memory_argmem_read(ptr writable %arg) memory(write, argmem: read) {24 ret void25}26 27; CHECK-NOT: incompatible28define void @writable_memory_argmem_write(ptr writable %arg) memory(read, argmem: write) {29 ret void30}31