This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[testsuite, i386] Avoid finite in gcc.target/i386/avx512dq-vfpclasspd-2.c etc.


Some AVX512DQ tests are failing on Solaris/x86 with gas:

FAIL: gcc.target/i386/avx512dq-vfpclasspd-2.c (test for excess errors)
FAIL: gcc.target/i386/avx512dq-vfpclassps-2.c (test for excess errors)
FAIL: gcc.target/i386/avx512vl-vfpclasspd-2.c (test for excess errors)
FAIL: gcc.target/i386/avx512vl-vfpclassps-2.c (test for excess errors)

FAIL: gcc.target/i386/avx512dq-vfpclasspd-2.c (test for excess errors)
Excess errors:
/vol/gcc/src/hg/trunk/local/gcc/testsuite/gcc.target/i386/avx512dq-vfpclasspd-2.c:24:20: warning: implicit declaration of function 'finite' [-Wimplicit-function-declaration]

finite() is non-standard and requires <ieeefp.h> on Solaris.  Instead of
this, I believe it's simplest to just use __builtin_finite instead.

The following patch does just that.  Tested with the appropriate runtest
invocation on i386-pc-solaris2.11 and x86_64-unknown-linux-gnu.

Ok for mainline?

	Rainer


2015-04-08  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	* gcc.target/i386/avx512dq-vfpclasspd-2.c (check_fp_class_dp): Use
	__builtin_finite instead of finite.
	* gcc.target/i386/avx512dq-vfpclassps-2.c (check_fp_class_sp):
	Likewise.

# HG changeset patch
# Parent 4a9cc7114f8129eb1eda0f314ca2ae48494b48be
Avoid finite in gcc.target/i386/avx512dq-vfpclasspd-2.c etc.

diff --git a/gcc/testsuite/gcc.target/i386/avx512dq-vfpclasspd-2.c b/gcc/testsuite/gcc.target/i386/avx512dq-vfpclasspd-2.c
--- a/gcc/testsuite/gcc.target/i386/avx512dq-vfpclasspd-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx512dq-vfpclasspd-2.c
@@ -21,7 +21,7 @@ int check_fp_class_dp (double src, int i
   int PInf_res = (isinf (src) == 1);
   int NInf_res = (isinf (src) == -1);
   int Denorm_res = (fpclassify (src) == FP_SUBNORMAL);
-  int FinNeg_res = finite (src) && (src < 0);
+  int FinNeg_res = __builtin_finite (src) && (src < 0);
 
   int result = (((imm & 1) && qNaN_res)
 		|| (((imm >> 1) & 1) && Pzero_res)
diff --git a/gcc/testsuite/gcc.target/i386/avx512dq-vfpclassps-2.c b/gcc/testsuite/gcc.target/i386/avx512dq-vfpclassps-2.c
--- a/gcc/testsuite/gcc.target/i386/avx512dq-vfpclassps-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx512dq-vfpclassps-2.c
@@ -21,7 +21,7 @@ int check_fp_class_sp (float src, int im
   int PInf_res = (isinf (src) == 1);
   int NInf_res = (isinf (src) == -1);
   int Denorm_res = (fpclassify (src) == FP_SUBNORMAL);
-  int FinNeg_res = finite (src) && (src < 0);
+  int FinNeg_res = __builtin_finite (src) && (src < 0);
 
   int result = (((imm & 1) && qNaN_res)
 		|| (((imm >> 1) & 1) && Pzero_res)
-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]