From 160874e4cda4402512a4ccc1c36a723226cabf2a Mon Sep 17 00:00:00 2001 From: "Steven G. Kargl" Date: Sun, 20 Jun 2004 18:34:25 +0000 Subject: [PATCH] arith.c (gfc_range_check): correct complex underflow. 2004-06-20 Steven G. Kargl * arith.c (gfc_range_check): correct complex underflow. From-SVN: r83417 --- gcc/fortran/ChangeLog | 4 ++++ gcc/fortran/arith.c | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index ef5d72bac39..2348f28e030 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,7 @@ +2004-06-20 Steven G. Kargl + + * arith.c (gfc_range_check): correct complex underflow. + 2004-06-15 Tobias Schlueter PR fortran/15962 diff --git a/gcc/fortran/arith.c b/gcc/fortran/arith.c index 6b7b29a18ad..b6aec5b951d 100644 --- a/gcc/fortran/arith.c +++ b/gcc/fortran/arith.c @@ -1198,12 +1198,12 @@ gfc_range_check (gfc_expr * e) case BT_COMPLEX: rc = gfc_check_real_range (e->value.complex.r, e->ts.kind); if (rc == ARITH_UNDERFLOW) - mpf_set_ui (e->value.real, 0); + mpf_set_ui (e->value.complex.r, 0); if (rc == ARITH_OK || rc == ARITH_UNDERFLOW) { rc = gfc_check_real_range (e->value.complex.i, e->ts.kind); if (rc == ARITH_UNDERFLOW) - mpf_set_ui (e->value.real, 0); + mpf_set_ui (e->value.complex.i, 0); } break; -- 2.30.2