This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
gcc builtin math vs glibc testsuite
- From: Richard Henderson <rth at redhat dot com>
- To: Roger Sayle <roger at eyesopen dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 30 Jun 2003 12:41:20 -0700
- Subject: gcc builtin math vs glibc testsuite
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
Failure: pow (0, -11) == inf plus division by zero exception:
Exception "Divide by zero" not set
Failure: pow (0, -2) == inf plus division by zero exception:
Exception "Divide by zero" not set
When I look at the generated code for
check_float ("pow (0, -1) == inf plus division by zero exception",
pow (0, -1), plus_infty, 0, 0, DIVIDE_BY_ZERO_EXCEPTION);
the compiler has hoisted the call to pow elsewhere, which means
of course that the exception bits are not set as expected.
I think without the equivalent of "#pragma STDC FENV_ACCESS OFF"
we have to treat a good many of these functions as non-const,
at least without -ffast-math. I know that we can't even pretend
proper support for turning FENV_ACCESS ON at present, but this
case of it not working with an external function is a regression
from earlier gcc's.
r~