From e332b68d76a8ce6b16439e235d5013a1182a22a9 Mon Sep 17 00:00:00 2001 From: Steve Kargl Date: Tue, 18 May 2004 11:09:29 +0000 Subject: [PATCH] arith.c (gfc_int2complex): Fix incorrect range checking. 2004-05-17 Steve Kargl * arith.c (gfc_int2complex): Fix incorrect range checking. From-SVN: r81985 --- gcc/fortran/ChangeLog | 4 ++++ gcc/fortran/arith.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) 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); -- 2.30.2