From 1ea8c961c82baa476503a04a81c73519971e0380 Mon Sep 17 00:00:00 2001 From: Christophe Lyon Date: Fri, 10 Nov 2017 12:54:59 +0000 Subject: [PATCH] [ARM,testsuite] Skip copysign_softfloat_1.c on hard-float targets gcc/testsuite/ 2017-11-10 Christophe Lyon * lib/target-supports.exp (check_effective_target_arm_soft_ok): New function. * gcc.target/arm/copysign_softfloat_1.c: Require arm_soft_ok effective target. From-SVN: r254626 --- gcc/testsuite/ChangeLog | 7 +++++++ gcc/testsuite/gcc.target/arm/copysign_softfloat_1.c | 1 + gcc/testsuite/lib/target-supports.exp | 13 +++++++++++++ 3 files changed, 21 insertions(+) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 620044a92a1..dc6799a476c 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2017-11-10 Christophe Lyon + + * lib/target-supports.exp (check_effective_target_arm_soft_ok): + New function. + * gcc.target/arm/copysign_softfloat_1.c: Require arm_soft_ok + effective target. + 2017-11-10 Paul Thomas PR fortran/82934 diff --git a/gcc/testsuite/gcc.target/arm/copysign_softfloat_1.c b/gcc/testsuite/gcc.target/arm/copysign_softfloat_1.c index 1260a6f8eeb..d79d014e27c 100644 --- a/gcc/testsuite/gcc.target/arm/copysign_softfloat_1.c +++ b/gcc/testsuite/gcc.target/arm/copysign_softfloat_1.c @@ -1,5 +1,6 @@ /* { dg-do run } */ /* { dg-require-effective-target arm_thumb2_ok } */ +/* { dg-require-effective-target arm_soft_ok } */ /* { dg-skip-if "skip override" { *-*-* } { "-mfloat-abi=softfp" "-mfloat-abi=hard" } { "" } } */ /* { dg-options "-O2 -mfloat-abi=soft --save-temps" } */ extern void abort (void); diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index 54e203681ba..964bce94006 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -3414,6 +3414,19 @@ proc check_effective_target_arm_vect_no_misalign { } { } +# Return 1 if this is an ARM target supporting -mfloat-abi=soft. Some +# multilibs may be incompatible with this option. + +proc check_effective_target_arm_soft_ok { } { + if { [check_effective_target_arm32] } { + return [check_no_compiler_messages arm_soft_ok executable { + int main() { return 0;} + } "-mfloat-abi=soft"] + } else { + return 0 + } +} + # Return 1 if this is an ARM target supporting -mfpu=vfp # -mfloat-abi=softfp. Some multilibs may be incompatible with these # options. -- 2.30.2