http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56028
Bug #: 56028 Summary: Splitting a 64-bit volatile store Classification: Unclassified Product: gcc Version: 4.7.2 URL: http://gcc.gnu.org/ml/gcc-patches/2013-01/msg00870.htm l Status: UNCONFIRMED Keywords: wrong-code Severity: normal Priority: P3 Component: target AssignedTo: unassig...@gcc.gnu.org ReportedBy: amona...@gcc.gnu.org CC: eugeni.stepa...@gmail.com, khlebni...@openvz.org, m...@pengutronix.de, paul...@linux.vnet.ibm.com, ubiz...@gmail.com, valery.bickov+...@gmail.com Target: i?86-*-* x86_64-*-* Created attachment 29201 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=29201 test case +++ This bug was initially created as a clone of Bug #55981 +++ As suggested in the parent bug, this is a separate report dealing specifically with splitting of a 64-bit volatile (not necessarily atomic) store of an immediate value into 32-bit accesses. Comment 10 of the original report says: > > > Btw, the same happens if atomic is replaced with "volatile unsigned long > > > y" - > > > which does not violate the standard, but may be considered undesirable by > > > some. > > > I don't have a strong opinion about this. > > > > This really does need to be fixed in the "volatile unsigned long y" case, or > > device drivers storing constants to device registers will break. So please > > fix > > this for volatiles as well as atomics. > > Please open a new PR for this. It looks to me that volatiles should not be allowed as offsetable operands, but let's discuss this in a separate PR.