unreliable/confusing dg-add-options arm_fp16_alternatives

Alexandre Oliva oliva@adacore.com
Wed Apr 8 15:27:02 GMT 2020


On Mar 27, 2020, Alexandre Oliva <oliva@adacore.com> wrote:

> So, here are some potential fixes:

> - install the patchlet for fp16-aapcs-3.c above, and be done with it

> - add an arm_fp16_hw requirement to this test

> - add to check_effective_target_arm_fp16_alternative_ok_nocache above a
>   check for arm_fp16, besides arm32.

> Unrelated potential fix, assuming it's a cut&pasto rather than intended:

> - drop the et_arm_neon_fp16_flags settings from the unrelated (?)
>   check_effective_target_arm_fp16_alternative_ok_nocache


Here's the patchlet turned into a patch submission:


add missing fp16 options

dg-require-effective-target arm_fp16_alternative_ok may pass even when
arm_fp16_ok doesn't, and the latter's failure inhibits dg-add-options
arm_fp16_alternative.  Requiring arm_fp16_ok would disable the test,
but if we just pass it the -mfp16-format=alternative option, it passes
even without arm_fp16_ok.  Sibling test fp16-aapcs-4.c underwent a
similar change, so I'm proposing the explicit option to fp16-aapcs-3.c
as well.

Tested with an arm-eabi cross compiler configured for a machine with
-mfloat-abi=hard -mfpu=vfpv3-d16.  Ok to install?


for  gcc/testsuite/ChangeLog

	* gcc.target/arm/fp16-aapcs-3.c: Explicitly use the
	-mfp16-format=alternative option.
---
 gcc/testsuite/gcc.target/arm/fp16-aapcs-3.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/gcc/testsuite/gcc.target/arm/fp16-aapcs-3.c b/gcc/testsuite/gcc.target/arm/fp16-aapcs-3.c
index 56a3ae2..858181c 100644
--- a/gcc/testsuite/gcc.target/arm/fp16-aapcs-3.c
+++ b/gcc/testsuite/gcc.target/arm/fp16-aapcs-3.c
@@ -1,8 +1,7 @@
 /* { dg-do compile }  */
 /* { dg-require-effective-target arm_hard_vfp_ok }  */
 /* { dg-require-effective-target arm_fp16_alternative_ok } */
-/* { dg-options "-O2" }  */
-/* { dg-add-options arm_fp16_alternative } */
+/* { dg-options "-O2 -mfp16-format=alternative" }  */
 
 /* Test __fp16 arguments and return value in registers (hard-float).  */
 


-- 
Alexandre Oliva, freedom fighter    he/him    https://FSFLA.org/blogs/lxo/
Free Software Evangelist              Stallman was right, but he's left :(
GNU Toolchain Engineer           Live long and free, and prosper ethically


More information about the Gcc-patches mailing list