diff options
author | fxcoudert <fxcoudert@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-07-28 15:23:11 +0000 |
---|---|---|
committer | fxcoudert <fxcoudert@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-07-28 15:23:11 +0000 |
commit | 34203d28b4109d309423f5e1d4c177b3bb9575c7 (patch) | |
tree | 9929c388cc73a98ff25ef599b9a7375c67cab0a8 /gcc/fortran/f95-lang.c | |
parent | 5d1b319b5608a568e3716864c701e4d65329f932 (diff) | |
download | gcc-34203d28b4109d309423f5e1d4c177b3bb9575c7.tar.gz |
PR fortran/32048
* f95-lang.c (gfc_init_builtin_functions): Add declaration for
__builtin_isnan.
* trans-intrinsic.c (gfc_conv_intrinsic_minmax): Handled NaNs.
* gfortran.dg/nan_1.f90: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@127019 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran/f95-lang.c')
-rw-r--r-- | gcc/fortran/f95-lang.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/fortran/f95-lang.c b/gcc/fortran/f95-lang.c index 314fc3796d1..3e03ef616c0 100644 --- a/gcc/fortran/f95-lang.c +++ b/gcc/fortran/f95-lang.c @@ -1004,6 +1004,11 @@ gfc_init_builtin_functions (void) "malloc", false); DECL_IS_MALLOC (built_in_decls[BUILT_IN_MALLOC]) = 1; + tmp = tree_cons (NULL_TREE, void_type_node, void_list_node); + ftype = build_function_type (integer_type_node, tmp); + gfc_define_builtin ("__builtin_isnan", ftype, BUILT_IN_ISNAN, + "__builtin_isnan", true); + #define DEF_PRIMITIVE_TYPE(ENUM, VALUE) \ builtin_types[(int) ENUM] = VALUE; #define DEF_FUNCTION_TYPE_0(ENUM, RETURN) \ |