http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50521
--- Comment #13 from Tomohiro Kashiwada <kikairoya at gmail dot com> 2011-10-29 06:50:11 UTC --- (In reply to comment #12) > Regarding the double load. In a statement like a = b, both a & be should be > individually accessed even if they refer to the same storage. So > bitfield.bits.a = bitfield.bits.c should load the bitfield variable twice, > once > for reading the rvalue and once for masking the lvalue assignment. > > See 7.1.7.5 second and third paragraph and the note just after. Is that means a statement a = b; always should be treat as if tmp = b; a = tmp; two individual statements? > Regarding STRICT_ALIGNMENT, not strictly needed on ARM i think. Smaller > accesses than the base type is acceptable, as long as it's aligned to the > matching access size (8/16/32/64 bit) and on ARMv7 unaligned access is > allowed, > but at a performance penalty. And this change is technically unrelated to > strict-volatile-bitfields even if there is overlap. I think STRICT_ALIGNMENT is not only for ARM, but also MIPS, SH and others. I'll create new ticket later about STRICT_ALIGNMENT.