summaryrefslogtreecommitdiff
path: root/tools/memory-model/litmus-tests/CoWW+poonceonce.litmus
diff options
context:
space:
mode:
Diffstat (limited to 'tools/memory-model/litmus-tests/CoWW+poonceonce.litmus')
-rw-r--r--tools/memory-model/litmus-tests/CoWW+poonceonce.litmus18
1 files changed, 18 insertions, 0 deletions
diff --git a/tools/memory-model/litmus-tests/CoWW+poonceonce.litmus b/tools/memory-model/litmus-tests/CoWW+poonceonce.litmus
new file mode 100644
index 000000000000..0d9f0a958799
--- /dev/null
+++ b/tools/memory-model/litmus-tests/CoWW+poonceonce.litmus
@@ -0,0 +1,18 @@
+C CoWW+poonceonce
+
+(*
+ * Result: Never
+ *
+ * Test of write-write coherence, that is, whether or not two successive
+ * writes to the same variable are ordered.
+ *)
+
+{}
+
+P0(int *x)
+{
+ WRITE_ONCE(*x, 1);
+ WRITE_ONCE(*x, 2);
+}
+
+exists (x=1)