public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-6903] testsuite: Fix gfortran.dg/ieee/signaling_?.f90 tests for x86 targets
@ 2022-01-27 21:15 Uros Bizjak
  0 siblings, 0 replies; only message in thread
From: Uros Bizjak @ 2022-01-27 21:15 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:ae1b50e2e03aad06408b64c876f5d0511121de0d

commit r12-6903-gae1b50e2e03aad06408b64c876f5d0511121de0d
Author: Uros Bizjak <ubizjak@gmail.com>
Date:   Thu Jan 27 22:14:18 2022 +0100

    testsuite: Fix gfortran.dg/ieee/signaling_?.f90 tests for x86 targets
    
    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.

Diff:
---
 gcc/testsuite/gfortran.dg/ieee/signaling_1.f90 | 2 +-
 gcc/testsuite/gfortran.dg/ieee/signaling_2.f90 | 2 +-
 gcc/testsuite/gfortran.dg/ieee/signaling_3.f90 | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/gcc/testsuite/gfortran.dg/ieee/signaling_1.f90 b/gcc/testsuite/gfortran.dg/ieee/signaling_1.f90
index 2b156811c1e..19fee283f54 100644
--- a/gcc/testsuite/gfortran.dg/ieee/signaling_1.f90
+++ b/gcc/testsuite/gfortran.dg/ieee/signaling_1.f90
@@ -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 }
diff --git a/gcc/testsuite/gfortran.dg/ieee/signaling_2.f90 b/gcc/testsuite/gfortran.dg/ieee/signaling_2.f90
index ee3805272a0..03b04c783eb 100644
--- a/gcc/testsuite/gfortran.dg/ieee/signaling_2.f90
+++ b/gcc/testsuite/gfortran.dg/ieee/signaling_2.f90
@@ -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 } */
diff --git a/gcc/testsuite/gfortran.dg/ieee/signaling_3.f90 b/gcc/testsuite/gfortran.dg/ieee/signaling_3.f90
index 22b36980896..ff2585d2589 100644
--- a/gcc/testsuite/gfortran.dg/ieee/signaling_3.f90
+++ b/gcc/testsuite/gfortran.dg/ieee/signaling_3.f90
@@ -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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-01-27 21:15 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-27 21:15 [gcc r12-6903] testsuite: Fix gfortran.dg/ieee/signaling_?.f90 tests for x86 targets Uros Bizjak

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).