From: Steve Kargl Date: Tue, 18 May 2004 11:09:29 +0000 (+0000) Subject: arith.c (gfc_int2complex): Fix incorrect range checking. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e332b68d76a8ce6b16439e235d5013a1182a22a9;p=gcc.git arith.c (gfc_int2complex): Fix incorrect range checking. 2004-05-17 Steve Kargl * arith.c (gfc_int2complex): Fix incorrect range checking. From-SVN: r81985 --- diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index e27e6854132..2cfe50d1314 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,7 @@ +2004-05-17 Steve Kargl + + * arith.c (gfc_int2complex): Fix incorrect range checking. + 2004-05-18 Paul Brook PR fortran/13930 diff --git a/gcc/fortran/arith.c b/gcc/fortran/arith.c index 0d81f730be4..4c036aef586 100644 --- a/gcc/fortran/arith.c +++ b/gcc/fortran/arith.c @@ -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);