https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91131
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2019-07-10 Ever confirmed|0 |1 Known to fail| |10.0, 8.3.0 --- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> --- So your complaint is that struct Reg_T { unsigned int a : 3; unsigned int b : 1; unsigned int c : 4; } __attribute__((packed)); volatile struct Reg_T Reg_A; ... Reg_A = (struct Reg_T){ .a = 0, .b = 0, .c = 0 }; does not yield a single store, correct? The reason is how we gimplify this: { Reg_A.a = 0; Reg_A.b = 0; Reg_A.c = 0; D.2005.a = 0; D.2005.b = 1; D.2005.c = 0; Reg_B = D.2005; D.2006.a = 7; D.2006.b = 1; D.2006.c = 15; Reg_C = D.2006; Reg_D = 0; Reg_E = 255; D.2007 = 0; return D.2007; } see how for the zero-initializer we emit three volatile accesses.