[testsuite] Fix arm options in gcc.dg/lto/20110201-1_0.c
commit2a1d85333f213ee8dc73c64ebd7a29596afa3973
authorktkachov <ktkachov@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 24 Jan 2018 14:43:52 +0000 (24 14:43 +0000)
committerktkachov <ktkachov@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 24 Jan 2018 14:43:52 +0000 (24 14:43 +0000)
treeafd3a1d77c5531e4fbec38badaa7ad50024622d4
parent47282587f8dd83b80d225332673165edafafa74e
[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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@257017 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/lto/20110201-1_0.c