http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51200
Bug #: 51200 Summary: Wrong code sequence to store restrict volatile bitfield Classification: Unclassified Product: gcc Version: 4.7.0 Status: UNCONFIRMED Severity: major Priority: P3 Component: middle-end AssignedTo: unassig...@gcc.gnu.org ReportedBy: joey...@arm.com Trunk 179074 generates wrong code sequence with -fstrict-volatile-bitfields on ARM and x86. ARM AAPCS default enable strict volatile bitfields so it is critical on ARM: /* { dg-do run } */ /* { dg-options "-fstrict-volatile-bitfields" } */ extern void abort(void); struct thing { volatile unsigned short a: 8; volatile unsigned short b: 8; } t = {1,2}; int main() { t.a = 3; if (t.a !=3 || t.b !=2) abort(); return 0; }