https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89251
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> --- That is not a trick. If you have a hardware register that can be accessed only in certain way, volatile is what should be used, gcc then has -fstrict-volatile-bitfields option (which defaults to true on arm/aarch64 AFAIK). For non-volatile, the compiler can decide to do anything that preserves the program semantics on normal memory.