This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: GCC 8.0.0 Status Report (2018-01-15), Trunk in Regression and Documentation fixes only mode
- From: Joseph Myers <joseph at codesourcery dot com>
- To: Vincent Lefevre <vincent+gcc at vinc17 dot org>
- Cc: <gcc at gcc dot gnu dot org>
- Date: Tue, 6 Feb 2018 17:32:30 +0000
- Subject: Re: GCC 8.0.0 Status Report (2018-01-15), Trunk in Regression and Documentation fixes only mode
- Authentication-results: sourceware.org; auth=none
- References: <alpine.LSU.2.20.1801150920260.32271@zhemvz.fhfr.qr> <962d449e-3ab8-f9ad-7a2d-8793ae0188d6@sky.com> <CAFiYyc0gJqTSsJmLihLozH4_DtJ24OWLm4pRzF2TMnGpcyS2tg@mail.gmail.com> <8441a3a4-de80-cf19-f9fe-2251fb9064e2@ubuntu.com> <20180206161438.GA10578@zira.vinc17.org>
On Tue, 6 Feb 2018, Vincent Lefevre wrote:
> The issues were also present on 64-bit platforms and were due to
> a bug in mpfr_div_ui, which has always been present, since 1999.
> With MPFR 4.0.0, they are also visible with mpfr_div just because
> mpfr_div now uses mpfr_div_ui in some simple cases. I don't think
> that GCC could be affected because AFAIK, a failure can only occur
> when the input and output precisions are different, or is this
> possible with GCC?
GCC doesn't use mpfr_div at all; it uses MPFR to fold calls to a range of
libm functions with constant arguments (input and output precisions should
always be the same, since GCC doesn't yet support built-in functions for
the TS 18661-1 narrowing functions such as fsqrtl), and for correctly
rounding conversions of decimal strings to binary floating point. The + -
* / operations are handled directly in real.c without use of MPFR. Of
course MPFR functions called might use mpfr_div indirectly.
--
Joseph S. Myers
joseph@codesourcery.com