diff options
-rw-r--r-- | gcc/fortran/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/fortran/arith.c | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 535840c..1fed01a 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,8 @@ +2004-05-17 Steve Kargl <kargls@comcast.net> + + * arith.c (gfc_real2complex): Range checking wrong part of complex + number. + 2004-05-16 Paul Brook <paul@codesourcery.com> * options.c (gfc_handle_module_path_options): Fix buffer overrun. diff --git a/gcc/fortran/arith.c b/gcc/fortran/arith.c index 7d47151..5b4d701 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); |