https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110772
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> --- I am trying to understand what you think is wrong here? lsrs r3, r3, #7 means logical shift right by 7 and compare against 0. Also this is big-endian arm so the order of bit fields will be different than little-endian. This is extracting one bit from the whole byte. x86 has an instruction (testb) which does the testing that way. arm does not. powerpc does not either. aarch64 has an instruction too. I don't see anything wrong with the code generation here at all. Take: ``` struct t { _Bool a0:1; _Bool a1:1; _Bool a2:1; _Bool a3:1; _Bool a4:1; _Bool a5:1; _Bool a6:1; _Bool a7:1; }; int g(); int h(); int f(struct t *a) { if(a->a0) return g(); return h(); } int f1(struct t *a) { if(a->a7) return g(); return h(); } int f2(_Bool *a) { if(*a) return g(); return h(); } ``` I don't see anything wrong with the above code generation for either arm or x86_64 (or powerpc).