diff options
author | Kyrylo Tkachov <kyrylo.tkachov@arm.com> | 2018-01-24 14:43:52 +0000 |
---|---|---|
committer | Kyrylo Tkachov <ktkachov@gcc.gnu.org> | 2018-01-24 14:43:52 +0000 |
commit | a84aff585b6fea6445ae831d523f088c9662af73 (patch) | |
tree | afd3a1d77c5531e4fbec38badaa7ad50024622d4 /gcc | |
parent | 3dede32b88100a88ff442c6228dddc989a8f407b (diff) | |
download | gcc-a84aff585b6fea6445ae831d523f088c9662af73.zip gcc-a84aff585b6fea6445ae831d523f088c9662af73.tar.gz gcc-a84aff585b6fea6445ae831d523f088c9662af73.tar.bz2 |
[testsuite] Fix arm options in gcc.dg/lto/20110201-1_0.c
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.
* gcc.dg/lto/20110201-1_0.c: Remove explicit -mfloat-abi=softfp
option. Add arm_neon_ok_no_float_abi check.
From-SVN: r257017
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/lto/20110201-1_0.c | 3 |
2 files changed, 7 insertions, 1 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index b13ec74..af42b95 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +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. + 2018-01-24 Richard Biener <rguenther@suse.de> PR tree-optimization/83176 diff --git a/gcc/testsuite/gcc.dg/lto/20110201-1_0.c b/gcc/testsuite/gcc.dg/lto/20110201-1_0.c index 2144f07..871a49f 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 } */ |