]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
testsuite: Fix gfortran.dg/ieee/signaling_?.f90 tests for x86 targets
authorUros Bizjak <ubizjak@gmail.com>
Thu, 27 Jan 2022 21:14:18 +0000 (22:14 +0100)
committerUros Bizjak <ubizjak@gmail.com>
Thu, 27 Jan 2022 21:15:02 +0000 (22:15 +0100)
As stated in signaling_?.f90 tests, x86-32 ABI is not suitable to
correctly handle signaling NaNs.  However, XFAIL is not the correct choice
to disable these tests, since various optimizations can generate code
that avoids moves from registers to memory (and back), resulting
in the code that executes correctly, producing spurious XFAIL.
These tests should be disabled on x86-32 using { ! ia32 } dg-directive
which rules out x32 ilp32 ABI, where tests execute without problems.

Please note that check_effective_target_ia32 test tries to compile code that
uses __i386__ target-dependent preprocessor definition, so it is guaranteed
to fail on all non-ia32 targets.

2022-01-27  Uroš Bizjak  <ubizjak@gmail.com>

gcc/testsuite/ChangeLog:

* gfortran.dg/ieee/signaling_1.f90 (dg-do):
Run only on non-ia32 targets.
* gfortran.dg/ieee/signaling_2.f90 (dg-do): Ditto.
* gfortran.dg/ieee/signaling_3.f90 (dg-do): Ditto.

gcc/testsuite/gfortran.dg/ieee/signaling_1.f90
gcc/testsuite/gfortran.dg/ieee/signaling_2.f90
gcc/testsuite/gfortran.dg/ieee/signaling_3.f90

index 2b156811c1ecb5744407e847cb511321f4be94f3..19fee283f54328d597fd1911e0f760f65e5d03d9 100644 (file)
@@ -1,4 +1,4 @@
-! { dg-do run { xfail { { i?86-*-* x86_64-*-* } && ilp32 } } }
+! { dg-do run { target { ! ia32 } } }
 ! x87 / x86-32 ABI is unsuitable for signaling NaNs
 !
 ! { dg-additional-sources signaling_1_c.c }
index ee3805272a099913b8f019018b3d0e5394315213..03b04c783ebf157e24ca2c5d952054482ca21601 100644 (file)
@@ -1,4 +1,4 @@
-! { dg-do run { xfail { { i?86-*-* x86_64-*-* } && ilp32 } } }
+! { dg-do run { target { ! ia32 } } }
 ! x87 / x86-32 ABI is unsuitable for signaling NaNs
 !
 ! { dg-require-effective-target issignaling } */
index 22b36980896c91ba4592f500eb89fd4ea80a4aa3..ff2585d25897cd651b0d39742fd4c5acc2517c93 100644 (file)
@@ -1,4 +1,4 @@
-! { dg-do run { xfail { { i?86-*-* x86_64-*-* } && ilp32 } } }
+! { dg-do run { target { ! ia32 } } }
 ! x87 / x86-32 ABI is unsuitable for signaling NaNs
 !
 program test