https://gcc.gnu.org/g:3d30fc2f73ccc179a78207848343a9807a671c1f
commit r16-8549-g3d30fc2f73ccc179a78207848343a9807a671c1f Author: Torbjörn SVENSSON <[email protected]> Date: Thu Apr 2 13:56:59 2026 +0200 testsuite: arm: xfail test unless SP and DP FP [PR113276] gcc/testsuite/ChangeLog: PR testsuite/113276 * gcc.dg/torture/fp-double-convert-float-1.c: Xfail test for arm* unless single- and double-precision FP. * lib/target-supports.exp (check_effective_target_arm_mixed_fp): New function. Signed-off-by: Torbjörn SVENSSON <[email protected]> Diff: --- gcc/testsuite/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 1c28a9e101eb..a0d8ae61278f 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_mixed_fp } } } */ /* { 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 1316254a06a9..64e7653e755b 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -6375,6 +6375,22 @@ foreach { armfunc armflag armdefs } { }] } +# Return 1 if current target supports both single- and double-precision FP +proc check_effective_target_arm_mixed_fp { } { + if { ![istarget arm*-*-*] } { + return 0 + } + + return [check_no_compiler_messages arm_mixed_fp assembly { + #ifndef __ARM_FP + # error __ARM_FP not defined + #elif ((__ARM_FP & 0xc) == 0xc) + # error __ARM_FP indicates that both single- and double-precision FP are supported + #endif + int main (void) { return 0; } + } "" ] +} + # Return 1 if GCC was configured with --with-mode= proc check_effective_target_default_mode { } {
