From 5fc610ca7bbffa0ab8f9cdacbe920c9496549c4f Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Mon, 7 Nov 2016 05:26:10 +0100 Subject: fix math tests compile --- test/math/Makefile.in | 7 +++++++ test/math/libm-test.inc | 10 +++++----- 2 files changed, 12 insertions(+), 5 deletions(-) (limited to 'test/math') diff --git a/test/math/Makefile.in b/test/math/Makefile.in index 0b26805..c2b9f3b 100644 --- a/test/math/Makefile.in +++ b/test/math/Makefile.in @@ -12,6 +12,13 @@ TESTS_DISABLED += test-ldouble test-ldouble-finite test-ildoubl compile_test c99 # disable tgmath tests, not implemented TESTS_DISABLED += test-tgmath test-tgmath2 test-tgmath-int test-tgmath-ret +CFLAGS_test-double = -std=c11 +CFLAGS_test-double-finite = -std=c11 +CFLAGS_test-float = -std=c11 +CFLAGS_test-float-finite = -std=c11 +CFLAGS_test-idouble = -std=c11 +CFLAGS_test-ifloat = -std=c11 + CFLAGS_test-signgam-finite = -ffinite-math-only CFLAGS_test-signgam-finite-c99 = -ffinite-math-only -std=c99 CFLAGS_test-signgam-finite-c11 = -ffinite-math-only -std=c11 diff --git a/test/math/libm-test.inc b/test/math/libm-test.inc index 5b1eacf..780b612 100644 --- a/test/math/libm-test.inc +++ b/test/math/libm-test.inc @@ -511,7 +511,7 @@ fpstack_test (const char *test_name) static int old_stack; int sw; - asm ("fnstsw" : "=a" (sw)); + __asm__ ("fnstsw" : "=a" (sw)); sw >>= 11; sw &= 7; @@ -8651,7 +8651,7 @@ isunordered_test (void) ALL_RM_TEST (isunordered, 1, isunordered_test_data, RUN_TEST_LOOP_ff_i_tg, END); } -#if defined __DO_XSI_MATH__ && !(defined TEST_LDOUBLE || defined TEST_FLOAT) +#if defined(__GLIBC__) && !defined(__UCLIBC__) static const struct test_f_f_data j0_test_data[] = { /* j0 is the Bessel function of the first kind of order 0 */ @@ -10402,7 +10402,7 @@ nextafter_test (void) ALL_RM_TEST (nextafter, 1, nextafter_test_data, RUN_TEST_LOOP_ff_f, END); } -#ifndef __UCLIBC__ +#if 0 static const struct test_f_f_data nextup_test_data[] = { TEST_f_f (nextup, minus_zero, min_subnorm_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), @@ -12277,7 +12277,7 @@ trunc_test (void) ALL_RM_TEST (trunc, 1, trunc_test_data, RUN_TEST_LOOP_f_f, END); } -#if defined __DO_XSI_MATH__ && !(defined TEST_LDOUBLE || defined TEST_FLOAT) +#if defined(__GLIBC__) && !defined(__UCLIBC__) static const struct test_f_f_data y0_test_data[] = { /* y0 is the Bessel function of the second kind of order 0 */ @@ -12717,7 +12717,7 @@ main (int argc, char **argv) /* Manipulation functions: */ copysign_test (); -#ifndef __UCLIBC__ +#if 0 nextup_test(); nextdown_test(); #endif -- cgit v1.2.3