"Bingfeng Mei" <b...@broadcom.com> writes:

> Here the bitpos = 0, bitsize = 52.  HOST_WIDE_INT for our processor
> is 32, though 64-bit long long type is supported.  The marked
> statement produces a mask of 0xfffff, thus causes the upper 32-bit
> removed later.  Is this a potential bug, or did I miss something?

gcc requires that the size of HOST_WIDE_INT be at least as large as
BITS_PER_WORD.  In your case BITS_PER_WORD is presumably 64; if it is
not, then the condition at the start of
optimize_bitfield_assignment_op should have returned false
immediately.

See need_64bit_hwint in config.gcc.

Ian

Reply via email to