[Bug target/89251] [2018-q4m] Wrong datatype optimization on bitfield

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Feb 8 12:31:00 GMT 2019


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.


More information about the Gcc-bugs mailing list