(Assume: int x{ 6 } and 2 evaluations write x = 6 at the same time)
--
CPP reference says on Memory model: Threads and data races:
When an evaluation of an expression writes to a memory location and another evaluation reads or modifies the same memory location, the expressions are said to conflict. A program that has two conflicting evaluations has a data race unless:
both evaluations execute on the same thread or in the same signal handler, or
both conflicting evaluations are atomic operations (see std::atomic), or
one of the conflicting evaluations happens-before another (see std::memory_order).
If a data race occurs, the behavior of the program is undefined.
The reference says: "another evaluation modifies"; It does not say "another evaluation writes".
--
C++ standard says on 6.9.2.2 Data races:
- Two expression evaluations conflict if one of them modifies a memory location ([intro.memory]) and the other one reads or modifies the same memory location.
--
Does re-writing the same value to a memory location count as modifying the memory?
Yes, for example simple assignment to a scalar object (which is what a memory location actually is with exceptions for bit fields) is defined to modify the object regardless of the value that the object is being changed to. See [expr.ass]/2:
You find similar wording for all other expressions that affect the value of a scalar object.
Regarding terminology, the standard usually doesn't use "write", it uses "modify" with the same meaning instead. See e.g. [defns.access].