On Aug 5, 2015, at 7:14 AM, Richard Sandiford <richard.sandif...@arm.com> wrote:
> wi::from_mpz reads the absolute value of the mpz and then negates the
> result if the mpz is negative.  When the top bit of the most-significant
> HOST_WIDE_INT in the absolute value is set, we implicitly sign-
> rather than zero-extend it to full precision.  For example,
> 1 << 63 gets mangled to (1 << prec) - (1 << 63).
> 
> This patch fixes that by ensuring we zero-extend instead.  The testcase
> is taken from comment 15 in bugzilla (thanks FX).
> 
> Tested on x86_64-linux-gnu.  OK to install?

I’ve installed this on the gcc-5.x branch after regression testing on x86_64 
linux.

Reply via email to