Fix lib/msun's ctrig_test/test_inf_inputs test case with clang >= 10

This sprinkles a few strategic volatiles in an attempt to defeat clang's
optimization interfering with the expected floating-point exception
flags.

Reported by:	lwhsu
PR:		244732
MFC after:	3 days
This commit is contained in:
Dimitry Andric 2021-02-09 22:06:51 +01:00
parent 011b7317db
commit ac76bc1145
4 changed files with 3 additions and 6 deletions

View File

@ -43,7 +43,7 @@ static const float huge = 0x1p127;
float complex
ccoshf(float complex z)
{
float x, y, h;
volatile float x, y, h;
int32_t hx, hy, ix, iy;
x = crealf(z);

View File

@ -76,7 +76,7 @@ __FBSDID("$FreeBSD$");
double complex
ctanh(double complex z)
{
double x, y;
volatile double x, y;
double t, beta, s, rho, denom;
uint32_t hx, ix, lx;

View File

@ -41,7 +41,7 @@ __FBSDID("$FreeBSD$");
float complex
ctanhf(float complex z)
{
float x, y;
volatile float x, y;
float t, beta, s, rho, denom;
uint32_t hx, ix;

View File

@ -248,9 +248,6 @@ ATF_TC_BODY(test_inf_inputs, tc)
long double complex z, c, s;
unsigned i;
if (atf_tc_get_config_var_as_bool_wd(tc, "ci", false))
atf_tc_expect_fail("https://bugs.freebsd.org/244732");
/*
* IN CSINH CCOSH CTANH
* Inf,Inf +-Inf,NaN inval +-Inf,NaN inval 1,+-0