[Bug target/56028] Splitting a 64-bit volatile store
paulmck at linux dot vnet.ibm.com
gcc-bugzilla@gcc.gnu.org
Fri Jan 18 17:40:00 GMT 2013
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56028
--- Comment #6 from Paul E. McKenney <paulmck at linux dot vnet.ibm.com> 2013-01-18 17:40:13 UTC ---
The fact that a data-race-free program cannot observe the non-atomicity of a
64-bit store, though true, is beside the point. The plain fact is that
hardware registers (for which volatile was intended) really do care about the
size of the store. A pair of 32-bit stores does not necessarily mean the same
thing to hardware as does a single 64-bit store. Given that C is intended to
be used for device drivers, volatile stores of reasonably-sized basic types
must be atomic, and on 64-bit systems, "reasonably-sized" very clearly includes
64-bit stores.
So this bug really does need to be fixed.
More information about the Gcc-bugs
mailing list