diff options
author | Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> | 2024-07-06 00:02:03 +0200 |
---|---|---|
committer | Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> | 2024-07-06 00:03:27 +0200 |
commit | eec30733bba305b02ba3c368289ef935f17c87e6 (patch) | |
tree | 930c17e1b30a60b3e66c3500717190f8cfffc919 /gcc | |
parent | 44e5ecfd261afe72aa04eba4bf1a9ec782579cab (diff) | |
download | gcc-eec30733bba305b02ba3c368289ef935f17c87e6.zip gcc-eec30733bba305b02ba3c368289ef935f17c87e6.tar.gz gcc-eec30733bba305b02ba3c368289ef935f17c87e6.tar.bz2 |
Fortran: switch test to use issignaling() built-in
The macro may not be present in all libc's, but the built-in
is always available.
gcc/testsuite/ChangeLog:
* gfortran.dg/ieee/signaling_2.f90: Adjust test.
* gfortran.dg/ieee/signaling_2_c.c: Adjust test.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/gfortran.dg/ieee/signaling_2.f90 | 3 | ||||
-rw-r--r-- | gcc/testsuite/gfortran.dg/ieee/signaling_2_c.c | 10 |
2 files changed, 3 insertions, 10 deletions
diff --git a/gcc/testsuite/gfortran.dg/ieee/signaling_2.f90 b/gcc/testsuite/gfortran.dg/ieee/signaling_2.f90 index 03b04c7..79a85ed 100644 --- a/gcc/testsuite/gfortran.dg/ieee/signaling_2.f90 +++ b/gcc/testsuite/gfortran.dg/ieee/signaling_2.f90 @@ -1,9 +1,6 @@ ! { dg-do run { target { ! ia32 } } } ! x87 / x86-32 ABI is unsuitable for signaling NaNs ! -! { dg-require-effective-target issignaling } */ -! The companion C source needs access to the issignaling macro. -! ! { dg-additional-sources signaling_2_c.c } ! { dg-additional-options "-w" } ! The -w option is needed to make cc1 not report a warning for diff --git a/gcc/testsuite/gfortran.dg/ieee/signaling_2_c.c b/gcc/testsuite/gfortran.dg/ieee/signaling_2_c.c index ea7fc04..dde0963 100644 --- a/gcc/testsuite/gfortran.dg/ieee/signaling_2_c.c +++ b/gcc/testsuite/gfortran.dg/ieee/signaling_2_c.c @@ -1,8 +1,4 @@ -#define _GNU_SOURCE -#include <math.h> -#include <float.h> - -int isnansf (float x) { return issignaling (x) ? 1 : 0; } -int isnans (double x) { return issignaling (x) ? 1 : 0; } -int isnansl (long double x) { return issignaling (x) ? 1 : 0; } +int isnansf (float x) { return __builtin_issignaling (x) ? 1 : 0; } +int isnans (double x) { return __builtin_issignaling (x) ? 1 : 0; } +int isnansl (long double x) { return __builtin_issignaling (x) ? 1 : 0; } |