@@ -193,7 +193,8 @@ endif
ifneq (no,$(PERL))
libm-vec-tests = $(addprefix test-,$(libmvec-tests))
-libm-tests = $(foreach t,$(types),test-$(t) test-$(t)-finite test-i$(t)) \
+libm-tests = $(foreach t,$(types),test-$(t) test-$(t)-finite test-i$(t) \
+ test-$(t)-ieee) \
$(libm-vec-tests)
libm-tests.o = $(addsuffix .o,$(libm-tests))
@@ -334,6 +335,10 @@ CFLAGS-test-flt-eval-method.c = -fexcess-precision=standard
CFLAGS-test-fe-snans-always-signal.c = -fsignaling-nans
+LDLIBS-test-float-ieee = -lieee
+LDLIBS-test-double-ieee = -lieee
+LDLIBS-test-ldouble-ieee = -lieee
+
# The -lieee module sets the _LIB_VERSION_ switch to IEEE mode
# for error handling in the -lm functions.
install-lib += libieee.a
@@ -619,7 +619,9 @@ check_float_internal (const char *test_name, FLOAT computed, FLOAT expected,
int errno_value = errno;
test_exceptions (test_name, exceptions);
- test_errno (test_name, errno_value, exceptions);
+ /* IEEE error handling (via libieee) doesn't support errno. */
+ if (_LIB_VERSION != _IEEE_)
+ test_errno (test_name, errno_value, exceptions);
if (exceptions & IGNORE_RESULT)
goto out;
if (issignaling (computed) && issignaling (expected))
new file mode 100644
@@ -0,0 +1,18 @@
+/* Copyright (C) 2017 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include "test-double.c"
new file mode 100644
@@ -0,0 +1,18 @@
+/* Copyright (C) 2017 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include "test-float.c"
new file mode 100644
@@ -0,0 +1,18 @@
+/* Copyright (C) 2017 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include "test-ldouble.c"