arith.c (gfc_int2complex): Fix incorrect range checking.

2004-05-17  Steve Kargl  <kargls@comcast.net>

* arith.c (gfc_int2complex): Fix incorrect range checking.

From-SVN: r81985
This commit is contained in:
Steve Kargl 2004-05-18 11:09:29 +00:00 committed by Tobias Schlüter
parent e72f28d00a
commit e332b68d76
2 changed files with 5 additions and 1 deletions

View File

@ -1,3 +1,7 @@
2004-05-17 Steve Kargl <kargls@comcast.net>
* arith.c (gfc_int2complex): Fix incorrect range checking.
2004-05-18 Paul Brook <paul@codesourcery.com>
PR fortran/13930

View File

@ -2595,7 +2595,7 @@ gfc_int2complex (gfc_expr * src, int kind)
mpf_set_z (result->value.complex.r, src->value.integer);
mpf_set_ui (result->value.complex.i, 0);
if ((rc = gfc_check_real_range (result->value.complex.i, kind)) != ARITH_OK)
if ((rc = gfc_check_real_range (result->value.complex.r, kind)) != ARITH_OK)
{
arith_error (rc, &src->ts, &result->ts, &src->where);
gfc_free_expr (result);