> >> Yes. I somehow did expect DECL_BIT_FIELD to be something simple, >> without dependency on if -fstrict-volatile-bitfields is given, or what >> Language front-end generated it, or if STRICT_ALIGNMENT is defined. > > Yes, it should be that way, and everything else is a bug. >
I tried something like this, and it did boot-strap, but failed in some acats tests: /* If the bitfield is volatile, we want to access it in the field's mode, not the computed mode. If a MEM has VOIDmode (external with incomplete type), use BLKmode for it instead. */ if (MEM_P (to_rtx)) { + gcc_assert ((TREE_CODE (to) == COMPONENT_REF && DECL_BIT_FIELD (TREE_OPERAND (to, 1))) + || (bitpos % BITS_PER_UNIT == 0 && bitsize % BITS_PER_UNIT == 0)); if (volatilep && flag_strict_volatile_bitfields> 0) to_rtx = adjust_address (to_rtx, mode1, 0); Bernd.