arith.c (gfc_range_check): correct complex underflow.

2004-06-20  Steven G. Kargl  <kargls@comcast.net>

* arith.c (gfc_range_check): correct complex underflow.

From-SVN: r83417
This commit is contained in:
Steven G. Kargl 2004-06-20 18:34:25 +00:00 committed by Tobias Schlüter
parent b9861bff6c
commit 160874e4cd
2 changed files with 6 additions and 2 deletions

View File

@ -1,3 +1,7 @@
2004-06-20 Steven G. Kargl <kargls@comcast.net>
* arith.c (gfc_range_check): correct complex underflow.
2004-06-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
PR fortran/15962

View File

@ -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;