Skip to content

Commit 2271fbb

Browse files
authored
gh-153740: Refine test for _Float16: check support from libm (#156815)
1 parent 7d701eb commit 2271fbb

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

configure

Lines changed: 3 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

configure.ac

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4474,12 +4474,14 @@ AC_CACHE_CHECK([for _Float16 support], [ac_cv_float16_supported],
44744474
WITH_SAVE_ENV([
44754475
CFLAGS="$CFLAGS -O0"
44764476
AC_RUN_IFELSE([AC_LANG_SOURCE([[
4477+
#include <math.h>
44774478
int main(void)
44784479
{
44794480
_Float16 val = 1.0f16;
4481+
int test = isinf(val) || isnan(val); /* basic support from libm */
44804482
double d = 3.14;
44814483
val = d;
4482-
return 0;
4484+
return test;
44834485
}
44844486
]])], [ac_cv_float16_supported=yes],
44854487
[ac_cv_float16_supported=no],

0 commit comments

Comments
 (0)