https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107745

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
I think we have many dups on this.  IBM double double isn't accurately emulated
inside of GCC (GCC emulation pretends it is a 106-bit mantissa type, which
isn't true, e.g. for denormals it has only 53-bit mantissa, while in some cases
it has up to 2000-ish bit mantissa), so the constant evaluation punts if
computations in this mode are inexact, because they can differ from what one
gets at runtime.
Fixing this would involve representing MODE_COMPOSITE_P inside of gcc not as
one REAL_VALUE_TYPE, but a pair of DFmode REAL_VALUE_TYPEs at least for the
basic arithmetics and enforce on that the IBM double double constraints.
What to do with constexpr evaluation of math functions, starting with
nextafterl etc. is unknown, even libm is full of comments where it doesn't
really know what to do for those cases.  E.g. I think for nextafterl it mostly
pretends it is a 106-bit mantissa type except for subnormals.
Anyway, I'm afraid this is a month or more of work and so far nobody was
willing to invest that time in a dying format with numerically unusable
properties.
powerpc64le-linux is phasing that out and switching to IEEE quad instead.

Reply via email to