summaryrefslogtreecommitdiff
path: root/test/Verifier/writeonly.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/Verifier/writeonly.ll')
-rw-r--r--test/Verifier/writeonly.ll13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/Verifier/writeonly.ll b/test/Verifier/writeonly.ll
new file mode 100644
index 0000000000000..0eeaebbc3a889
--- /dev/null
+++ b/test/Verifier/writeonly.ll
@@ -0,0 +1,13 @@
+; RUN: not llvm-as %s -o /dev/null 2>&1 | FileCheck %s
+
+declare void @a() readnone writeonly
+; CHECK: Attributes {{.*}} are incompatible
+
+declare void @b() readonly writeonly
+; CHECK: Attributes {{.*}} are incompatible
+
+declare void @c(i32* readnone writeonly %p)
+; CHECK: Attributes {{.*}} are incompatible
+
+declare void @d(i32* readonly writeonly %p)
+; CHECK: Attributes {{.*}} are incompatible