From: Steve Kargl Date: Mon, 17 May 2004 23:19:47 +0000 (+0000) Subject: arith.c (gfc_real2complex): Range checking wrong part of complex number. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e876acbd25c26828c235f0723fc5b4554f4ea9d6;p=gcc.git 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 --- 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);