[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gcc
Subject:    Re: Bug in optimize_bitfield_assignment_op()?
From:       Ian Lance Taylor <iant () google ! com>
Date:       2008-12-19 15:33:28
Message-ID: m31vw42n93.fsf () google ! com
[Download RAW message or body]

"Bingfeng Mei" <bmei@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
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic