This litmus test is not compatible with klitmus7, which is much
stricter than herd7's C parser.
You can have only int or int* variables in the exists clause.
Register variables need their declarations at the top of each Pn()
(classic C).
See below for klitmus7 ready code.
And tools/memory-model/litmus-tests/README need to mention this
litmus test.
Thanks, Akira
---------------------------------------------
P0(int *x, int *y, atomic_t *z)
{
int r0;
WRITE_ONCE(*x, 1);
r0 = atomic_add_unless(z,1,5);
WRITE_ONCE(*y, 1);
}
P1(int *x, int *y)
{
int r0;
r0 = READ_ONCE(*y);
if (r0 == 1)
WRITE_ONCE(*x, 2);
}
exists (1:r0=1 /\ x=1)
---------------------------------------------