diff options
author | Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> | 2007-08-05 10:18:38 +0000 |
---|---|---|
committer | François-Xavier Coudert <fxcoudert@gcc.gnu.org> | 2007-08-05 10:18:38 +0000 |
commit | 3d97b1af3fa03940993985f5936b9748b79d2eb8 (patch) | |
tree | 8fbc4df09bb7056308d0cdaf08f97a757f42143a /gcc/fortran/check.c | |
parent | 517d76faeff9ae24c5c0dc6b87ffe3868c038d29 (diff) | |
download | gcc-3d97b1af3fa03940993985f5936b9748b79d2eb8.zip gcc-3d97b1af3fa03940993985f5936b9748b79d2eb8.tar.gz gcc-3d97b1af3fa03940993985f5936b9748b79d2eb8.tar.bz2 |
re PR fortran/32979 (Implement vendor-specific ISNAN() intrinsic function)
PR fortran/32979
* intrinsic.h (gfc_check_isnan): Add prototype.
* gfortran.h (gfc_isym_id): Add GFC_ISYM_ISNAN.
* intrinsic.c (add_functions): Add ISNAN intrinsic.
* check.c (gfc_check_isnan): New function.
* trans-intrinsic.c (gfc_conv_intrinsic_isnan): New function.
(gfc_conv_intrinsic_function): Call gfc_conv_intrinsic_isnan
to translate ISNAN.
* intrinsic.texi: Document ISNAN.
* gfortran.dg/isnan_1.f90: New test.
Co-Authored-By: Tobias Burnus <burnus@gcc.gnu.org>
From-SVN: r127224
Diffstat (limited to 'gcc/fortran/check.c')
-rw-r--r-- | gcc/fortran/check.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/fortran/check.c b/gcc/fortran/check.c index b615f73..e792773 100644 --- a/gcc/fortran/check.c +++ b/gcc/fortran/check.c @@ -3304,6 +3304,16 @@ gfc_check_isatty (gfc_expr *unit) try +gfc_check_isnan (gfc_expr *x) +{ + if (type_check (x, 0, BT_REAL) == FAILURE) + return FAILURE; + + return SUCCESS; +} + + +try gfc_check_perror (gfc_expr *string) { if (type_check (string, 0, BT_CHARACTER) == FAILURE) |