On 4/2/26 14:09, Torbjörn SVENSSON wrote:
Ok for trunk and releases/gcc-15?
LGTM (but I cannot approve) Thanks, Christophe
-- gcc/testsuite/ChangeLog: PR testsuite/113276 * gcc.dg/torture/fp-double-convert-float-1.c: Xfail test for arm* unless soft float or double-precision FP. * lib/target-supports.exp (check_effective_target_arm_softfp_or_dp): New function. Signed-off-by: Torbjörn SVENSSON <[email protected]> --- .../gcc.dg/torture/fp-double-convert-float-1.c | 2 +- gcc/testsuite/lib/target-supports.exp | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/gcc/testsuite/gcc.dg/torture/fp-double-convert-float-1.c b/gcc/testsuite/gcc.dg/torture/fp-double-convert-float-1.c index 1c28a9e101e..acf999f2495 100644 --- a/gcc/testsuite/gcc.dg/torture/fp-double-convert-float-1.c +++ b/gcc/testsuite/gcc.dg/torture/fp-double-convert-float-1.c @@ -1,5 +1,5 @@ /* PR57245 */ -/* { dg-do run } */ +/* { dg-do run { xfail { ! arm_softfp_or_dp } } } */ /* { dg-require-effective-target fenv } */ /* { dg-require-effective-target hard_float } */ /* { dg-additional-options "-frounding-math" } */ diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index 3f428ad5817..b61f77233f2 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -6352,6 +6352,22 @@ foreach { armfunc armflag armdefs } { }] }+# Return 1 if current target uses soft-float or supports double-precision FP+proc check_effective_target_arm_softfp_or_dp { } { + if { ![istarget arm*-*-*] } { + return 0 + } + + return [check_no_compiler_messages arm_softfp_or_dp assembly { + #ifdef __ARM_FP // Not defined => soft float + # if ((__ARM_FP & 8) == 0) + # error __ARM_FP indicates that double-precision is not supported + # endif + #endif + int main (void) { return 0; } + } "" ] +} + # Return 1 if GCC was configured with --with-mode= proc check_effective_target_default_mode { } {
