* [PATCH][testsuite] Fix arm options in gcc.dg/lto/20110201-1_0.c
@ 2018-01-24 15:47 Kyrill Tkachov
0 siblings, 0 replies; only message in thread
From: Kyrill Tkachov @ 2018-01-24 15:47 UTC (permalink / raw)
To: gcc-patches
[-- Attachment #1: Type: text/plain, Size: 1128 bytes --]
Hi all,
This test fails on arm hardfloat targets because it sets an explicit -mfloat-abi=softfp.
The usual approach to setting the NEON options is to use dg-add-options arm_neon.
But in the lto tests we don't have that framework, we can only set them explicitly with dg-lto-options.
The solution is to remove the explicit -mfloat-abi=softfp and instead add an effective target check
for arm_neon_ok_no_float_abi that makes sure we only run this test if -mfpu=neon is enough to get NEON
without any -mfloat-abi options. In fact, this is what the comment above check_effective_target_arm_neon_ok_no_float_abi_nocache
recommends for lto tests.
That way on my hardfloat toolchain the test doesn't try to link the softfp binary against a hard-float runtime/test glue
and all is good. I've tested that the test is appropriately skipped when testing a --with-float=soft toolchain.
Committing to trunk (as the patch only touches arm options)
Thanks,
Kyrill
2018-01-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
* gcc.dg/lto/20110201-1_0.c: Remove explicit -mfloat-abi=softfp
option. Add arm_neon_ok_no_float_abi check.
[-- Attachment #2: arm-test-lto.patch --]
[-- Type: text/x-patch, Size: 767 bytes --]
diff --git a/gcc/testsuite/gcc.dg/lto/20110201-1_0.c b/gcc/testsuite/gcc.dg/lto/20110201-1_0.c
index 2144f0714804ea1003d58f37ca5d16ced722a3a7..871a49fe1897511e39827b96c7c57931d689ce92 100644
--- a/gcc/testsuite/gcc.dg/lto/20110201-1_0.c
+++ b/gcc/testsuite/gcc.dg/lto/20110201-1_0.c
@@ -1,6 +1,7 @@
/* { dg-lto-do run } */
/* { dg-lto-options { { -O0 -flto -fno-math-errno } } } */
-/* { dg-lto-options { "-O0 -flto -fno-math-errno -mfloat-abi=softfp -mfpu=neon-vfpv4" } { target arm*-*-* } } */
+/* { dg-lto-options { "-O0 -flto -fno-math-errno -mfpu=neon-vfpv4" } { target arm*-*-* } } */
+/* { dg-require-effective-target arm_neon_ok_no_float_abi { target arm*-*-* } } */
/* { dg-require-linker-plugin "" } */
/* { dg-require-effective-target sqrt_insn } */
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2018-01-24 14:40 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-24 15:47 [PATCH][testsuite] Fix arm options in gcc.dg/lto/20110201-1_0.c Kyrill Tkachov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).