Compiling for ARMv8-A Using GCC 7.2.0 - Assertion error in gen-fac
Torbjörn Granlund
tg at gmplib.org
Fri Dec 6 14:55:05 UTC 2019
nisse at lysator.liu.se (Niels Möller) writes:
> I was able to narrow down the cause. In GC 7.2.0 the GMP_LLIMB_MASK is wrong:
>
> =GCC 4.8.5=
> GMP_LIMB_BITS=64
> GMP_LLIMB_MASK=4294967295=0xFFFFFFFF
>
> =GCC 7.2.0=
> GMP_LIMB_BITS=64
> GMP_LLIMB_MASK=1=0x00000001
>
> From my understanding this might be a difference in how GCC 7.2.0
> handles unsigned longs vs GCC 4.8.5. It also could be I am missing
> some vital compiler flag for GMP.
Can you file a gcc bug? These constants are defined as
#define GMP_LIMB_BITS (sizeof(mp_limb_t) * CHAR_BIT) /* 64, you say */
#define GMP_HLIMB_BIT ((mp_limb_t) 1 << (GMP_LIMB_BITS / 2))
#define GMP_LLIMB_MASK (GMP_HLIMB_BIT - 1)
I see no reasonable way that can end up defining GMP_LLIMB_MASK as 1.
The first thing to try might be gcc 7.4, which was the final gcc 7
release.
--
Torbjörn
Please encrypt, key id 0xC8601622
More information about the gmp-bugs
mailing list