aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorTamar Christina <tamar.christina@arm.com>2019-11-21 14:08:10 +0000
committerTamar Christina <tnfchris@gcc.gnu.org>2019-11-21 14:08:10 +0000
commit48ffab987ae013a642398ef4fe5ffdce71571ba5 (patch)
tree89fdc6234dcd270daad048450d0ec82372436a68 /gcc
parentd78b70959f334699bf556e9b8d4e0a8c12a64b46 (diff)
downloadgcc-48ffab987ae013a642398ef4fe5ffdce71571ba5.zip
gcc-48ffab987ae013a642398ef4fe5ffdce71571ba5.tar.gz
gcc-48ffab987ae013a642398ef4fe5ffdce71571ba5.tar.bz2
Testsuite: Fix fp-int-convert-timode-1.c testism.
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: * gcc.dg/torture/fp-int-convert-timode-1.c: Add check for FE_TONEAREST. From-SVN: r278552
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/ChangeLog4
-rw-r--r--gcc/testsuite/gcc.dg/torture/fp-int-convert-timode-1.c2
2 files changed, 6 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 0da0995..5af1de3 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,7 @@
+2019-11-21 Tamar Christina <tamar.christina@arm.com>
+
+ * gcc.dg/torture/fp-int-convert-timode-1.c: Add check for FE_TONEAREST.
+
2019-11-21 Richard Sandiford <richard.sandiford@arm.com>
* gcc.target/aarch64/sve2/whilerw_1.c: Add -fno-vect-cost-model.
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 0c524a8..bf7f3ce 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);
}