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:
parent
011b7317db
commit
ac76bc1145
@ -43,7 +43,7 @@ static const float huge = 0x1p127;
|
|||||||
float complex
|
float complex
|
||||||
ccoshf(float complex z)
|
ccoshf(float complex z)
|
||||||
{
|
{
|
||||||
float x, y, h;
|
volatile float x, y, h;
|
||||||
int32_t hx, hy, ix, iy;
|
int32_t hx, hy, ix, iy;
|
||||||
|
|
||||||
x = crealf(z);
|
x = crealf(z);
|
||||||
|
@ -76,7 +76,7 @@ __FBSDID("$FreeBSD$");
|
|||||||
double complex
|
double complex
|
||||||
ctanh(double complex z)
|
ctanh(double complex z)
|
||||||
{
|
{
|
||||||
double x, y;
|
volatile double x, y;
|
||||||
double t, beta, s, rho, denom;
|
double t, beta, s, rho, denom;
|
||||||
uint32_t hx, ix, lx;
|
uint32_t hx, ix, lx;
|
||||||
|
|
||||||
|
@ -41,7 +41,7 @@ __FBSDID("$FreeBSD$");
|
|||||||
float complex
|
float complex
|
||||||
ctanhf(float complex z)
|
ctanhf(float complex z)
|
||||||
{
|
{
|
||||||
float x, y;
|
volatile float x, y;
|
||||||
float t, beta, s, rho, denom;
|
float t, beta, s, rho, denom;
|
||||||
uint32_t hx, ix;
|
uint32_t hx, ix;
|
||||||
|
|
||||||
|
@ -248,9 +248,6 @@ ATF_TC_BODY(test_inf_inputs, tc)
|
|||||||
long double complex z, c, s;
|
long double complex z, c, s;
|
||||||
unsigned i;
|
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
|
* IN CSINH CCOSH CTANH
|
||||||
* Inf,Inf +-Inf,NaN inval +-Inf,NaN inval 1,+-0
|
* Inf,Inf +-Inf,NaN inval +-Inf,NaN inval 1,+-0
|
||||||
|
Loading…
Reference in New Issue
Block a user