GMP 6.1.2 t-count_zeros failure on ARM with assertions

Vincent Lefevre vincent at vinc17.net
Wed Jan 17 18:15:41 UTC 2018


On 2018-01-17 18:06:49 +0100, Marc Glisse wrote:
> On Wed, 17 Jan 2018, Vincent Lefevre wrote:
> 
> > On 2018-01-17 17:23:02 +0100, Marc Glisse wrote:
> > > Indeed, it doesn't make sense to have both the assertion and
> > > COUNT_LEADING_ZEROS_0. Would it work to remove the assertion instead?
> > 
> > Yes, this works too (assuming that 0 will always be converted to +0).
> 
> You know those details better than me, is that a dangerous assumption to
> make? Even when restricted to the architectures / compilers that may use
> this code? I was expecting it to be rather safe, but if you think it isn't,
> then I'd rather go with your original patch.

I know that both icc -O2 and tcc had issues with signed zeros in the
past. But I haven't done any test for several years.

-- 
Vincent Lefèvre <vincent at vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)


More information about the gmp-bugs mailing list