]> git.ipfire.org Git - thirdparty/gcc.git/commit
re PR fortran/34333 (if(nan == nan) wrongly returns TRUE, when nan is a parameter)
authorTobias Burnus <burnus@gcc.gnu.org>
Wed, 5 Dec 2007 13:42:32 +0000 (14:42 +0100)
committerTobias Burnus <burnus@gcc.gnu.org>
Wed, 5 Dec 2007 13:42:32 +0000 (14:42 +0100)
commit7b4c5f8b9b0091733b4ae3377e294aa2651f8811
tree5e83d0d41ff004471fcd506967d79fb199570a11
parent59b130b365bbb85a040ee7e1de221cf4aedb691a
re PR fortran/34333 (if(nan == nan) wrongly returns TRUE, when nan is a parameter)

2007-12-05  Tobias Burnus  <burnus@net-b.de>

        PR fortran/34333
        * arith.h (gfc_compare_expr): Add operator argument, needed
        for compare_real.
        * arith.c (gfc_arith_init_1): Use mpfr_min instead of
        * mpfr_cmp/set
        to account for NaN.
        (compare_real): New function, as mpfr_cmp but takes NaN into
        account.
        (gfc_compare_expr): Use compare_real.
        (compare_complex): Take NaN into account.
        (gfc_arith_eq,gfc_arith_ne,gfc_arith_gt,gfc_arith_ge,gfc_arith_lt,
        gfc_arith_le): Pass operator to gfc_compare_expr.
        * resolve.c (compare_cases,resolve_select): Pass operator
        to gfc_compare_expr.
        * simplify.c (simplify_min_max): Take NaN into account.

2007-12-05  Tobias Burnus  <burnus@net-b.de>

        PR fortran/34333
        * gfortran.dg/nan_2.f90: New.

From-SVN: r130623
gcc/fortran/ChangeLog
gcc/fortran/arith.c
gcc/fortran/arith.h
gcc/fortran/resolve.c
gcc/fortran/simplify.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/nan_2.f90 [new file with mode: 0644]