summaryrefslogtreecommitdiffstats
path: root/llvm/test/Verifier/writeonly.ll
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/test/Verifier/writeonly.ll')
-rw-r--r--llvm/test/Verifier/writeonly.ll13
1 files changed, 13 insertions, 0 deletions
diff --git a/llvm/test/Verifier/writeonly.ll b/llvm/test/Verifier/writeonly.ll
new file mode 100644
index 00000000000..0eeaebbc3a8
--- /dev/null
+++ b/llvm/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
OpenPOWER on IntegriCloud