This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gcc builtin math vs glibc testsuite


Hi Richard,
> Roger, I think some of your builtin work is causing glibc
> testsuite failures.  On alpha-linux I'm seeing
>
> Failure: pow (0, -1) == inf plus division by zero exception:
> 	Exception "Divide by zero" not set

Thanks for pointing this out.  It turns out that the problem is
actually in fold-const.c's const_binop which is evaluating 1.0/0.0
at compile-time even with flag_trapping_math!  It looks like there's
already code in const_binop to avoid performing calculations if
either operand is a NaN.  However, even this could be improved as
we could can precompute these operations on NaN, if the user specified
-ffast-math, i.e. HONOR_NANS(mode).

I should have a patch bootstrapped and regression tested by the
end of the day.  One potential problem to look out for is that we
may be using 1.0/0.0 to generate IEEE Infinity rather than use the
new __builtin_inf.

Sorry for any inconvenience,

Roger
--


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]