1C WRC+pooncerelease+fencermbonceonce+Once
2
3(*
4 * Result: Never
5 *
6 * This litmus test is an extension of the message-passing pattern, where
7 * the first write is moved to a separate process.  Because it features
8 * a release and a read memory barrier, it should be forbidden.  More
9 * specifically, this litmus test is forbidden because smp_store_release()
10 * is A-cumulative in LKMM.
11 *)
12
13{
14	int x;
15	int y;
16}
17
18P0(int *x)
19{
20	WRITE_ONCE(*x, 1);
21}
22
23P1(int *x, int *y)
24{
25	int r0;
26
27	r0 = READ_ONCE(*x);
28	smp_store_release(y, 1);
29}
30
31P2(int *x, int *y)
32{
33	int r0;
34	int r1;
35
36	r0 = READ_ONCE(*y);
37	smp_rmb();
38	r1 = READ_ONCE(*x);
39}
40
41exists (1:r0=1 /\ 2:r0=1 /\ 2:r1=0)
42