Hi All,

The test fp-int-convert-timode-1.c uses FE_TONEAREST without
actually checking if the target has defined it.

Like the rest of the tests I now add a check to see if the target
has actually implemented it.

This fixed Arm newlib target failures.

Regtested on aarch64-none-elf and aarch64_be-none-elf and no issues.

Committed under the GCC obvious rules.

gcc/testsuite/ChangeLog:

2019-11-21  Tamar Christina  <tamar.christ...@arm.com>

        * gcc.dg/torture/fp-int-convert-timode-1.c: Add check for FE_TONEAREST.

-- 
diff --git a/gcc/testsuite/gcc.dg/torture/fp-int-convert-timode-1.c b/gcc/testsuite/gcc.dg/torture/fp-int-convert-timode-1.c
index 0c524a8c4782b6197bc0247a7f66340ca7d9579c..bf7f3cedb294cc834437593dae3507005f0f6b56 100644
--- a/gcc/testsuite/gcc.dg/torture/fp-int-convert-timode-1.c
+++ b/gcc/testsuite/gcc.dg/torture/fp-int-convert-timode-1.c
@@ -11,6 +11,7 @@
 int
 main (void)
 {
+#ifdef FE_TONEAREST
   volatile unsigned long long h = 0x8000000000000000LL;
   volatile unsigned long long l = 0xdLL;
   volatile unsigned __int128 u128 = (((unsigned __int128) h) << 64) | l;
@@ -22,5 +23,6 @@ main (void)
   double ds = s128;
   if (ds != -0x1p+127)
     abort ();
+#endif
   exit (0);
 }

Reply via email to