http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57994
--- Comment #6 from Marc Glisse <glisse at gcc dot gnu.org> --- (In reply to Paolo Carlini from comment #5) > Today I was thinking that given that, per docs and testsuite (double checked > yesterday) the mpfr functions are able to cope with +-Inf arguments to the > mathematical functions and evaluate correctly, gating the various do_mpfr_* > with !real_isnan instead of real_isfinite doesn't look like taking a big > risk, now that we are in Stage 1. Alone that would help a lot of code (in > particular, in the C++ library, which is the original motivating example). > Note, I'm not thinking replacing real_isfinite in various other places, in > particular not in do_mpc_* and its helpers (something for the future). > Comments? I haven't looked at that code closely enough to say if there is much that needs changing. Earlier you said that removing the real_isfinite test replaced sin(Inf) with NaN. Was that with -ffast-math? Without it, the change shouldn't happen (not without inserting a few extra statements). I am hoping that there is already code in place that checks if the mpfr calls set errno and calls mpfr_overflow_p (and family) for possible exceptions, though I somehow doubt that we test mpfr_inexflag_p or very little propagation would take place.