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]

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~


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