[Bug target/62180] (RX600) - compiler doesn't honor -fstrict-volatile-bitfields and generates incorrect machine code for I/O register access

jan.capek at braiins dot cz gcc-bugzilla@gcc.gnu.org
Tue Aug 19 08:41:00 GMT 2014


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62180

--- Comment #3 from Jan Čapek <jan.capek at braiins dot cz> ---
(In reply to Andrew Pinski from comment #1)
> C11 says something different here.

I can see the following the -fstrict-volatile-bitfields documentation:

"This option should be used if accesses to volatile bit-fields (or other
structure fields, although the compiler usually honors those types anyway)
should use a single access of the width of the field's type, aligned to a
 natural alignment if possible."

And this is actually the case with gcc 4.7.2, it ignore the -fstrict....
option, and also doesn't need volatile on the individual bit-fields and it
still generates correct code due to specifying the bitfield types.


More information about the Gcc-bugs mailing list