Hello,
I am tracking a bug and find the lshift_value function in
expmed.c questionable (both head and gcc 4.4).
Suppose HOST_BITS_PER_WIDE_INT = 32, bitpos = 0
and bitsize = 33, the following expression is wrong
high = (v >> (HOST_BITS_PER_WIDE_INT - bitpos))
& ((1 <<
"Bingfeng Mei" writes:
> /* Obtain value by shifting and set zeros for remaining part*/
> if((bitpos + bitsize) > HOST_BITS_PER_WIDE_INT)
> high = (v >> (HOST_BITS_PER_WIDE_INT - bitpos))
> & ((1 << (bitpos + bitsize - HOST_BITS_PER_WIDE_INT)) - 1);
That is
eng Mei
> Cc: gcc@gcc.gnu.org
> Subject: Re: A bug on 32-bit host?
>
> "Bingfeng Mei" writes:
>
> > /* Obtain value by shifting and set zeros for remaining part*/
> > if((bitpos + bitsize) > HOST_BITS_PER_WIDE_INT)
> &