Skip to content

Commit c2ec30b

Browse files
committed
test: compiler rt soft float sometimes set FE_INEXACT
On targets with 32-bit hardware floats, the compiler rt soft float code for 64-bit emulation will set FE_INEXACT in the floating point status register; it doesn't set any other bits though. Signed-off-by: Keith Packard <[email protected]>
1 parent 8ee9620 commit c2ec30b

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

test/math_errhandling_tests.c

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1694,9 +1694,15 @@ makemathname(run_tests)(void) {
16941694
}
16951695
} else {
16961696
if (except) {
1697-
PRINT;
1698-
printf("\texceptions not supported. %s returns %s\n", makemathname(tests)[t].name, e_to_str(except));
1699-
++result;
1697+
#if defined(__clang__) && MATH_ERREXCEPT && !EXCEPTION_TEST
1698+
if (except == FE_INEXACT) {
1699+
} else
1700+
#endif
1701+
{
1702+
PRINT;
1703+
printf("\texceptions not supported. %s returns %s\n", makemathname(tests)[t].name, e_to_str(except));
1704+
++result;
1705+
}
17001706
}
17011707
}
17021708
if (math_errhandling & MATH_ERRNO) {

0 commit comments

Comments
 (0)