From e876acbd25c26828c235f0723fc5b4554f4ea9d6 Mon Sep 17 00:00:00 2001 From: Steve Kargl Date: Mon, 17 May 2004 23:19:47 +0000 Subject: [PATCH] arith.c (gfc_real2complex): Range checking wrong part of complex number. 2004-05-17 Steve Kargl * arith.c (gfc_real2complex): Range checking wrong part of complex number. From-SVN: r81957 --- gcc/fortran/ChangeLog | 5 +++++ gcc/fortran/arith.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 535840c4a1c..1fed01aee95 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,8 @@ +2004-05-17 Steve Kargl + + * arith.c (gfc_real2complex): Range checking wrong part of complex + number. + 2004-05-16 Paul Brook * options.c (gfc_handle_module_path_options): Fix buffer overrun. diff --git a/gcc/fortran/arith.c b/gcc/fortran/arith.c index 7d47151a31d..5b4d7010427 100644 --- a/gcc/fortran/arith.c +++ b/gcc/fortran/arith.c @@ -2666,7 +2666,7 @@ gfc_real2complex (gfc_expr * src, int kind) mpf_set (result->value.complex.r, src->value.real); 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