arith.c (gfc_real2complex): Range checking wrong part of complex number.
authorSteve Kargl <kargls@comcast.net>
Mon, 17 May 2004 23:19:47 +0000 (23:19 +0000)
committerTobias Schlüter <tobi@gcc.gnu.org>
Mon, 17 May 2004 23:19:47 +0000 (01:19 +0200)
2004-05-17  Steve Kargl  <kargls@comcast.net>

* arith.c (gfc_real2complex): Range checking wrong part of complex
        number.

From-SVN: r81957

gcc/fortran/ChangeLog
gcc/fortran/arith.c

index 535840c4a1c1356499c352ee21017cd9e384fb52..1fed01aee95a8960b8bab4cbd7039e3f82c645f5 100644 (file)
@@ -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.
index 7d47151a31d2b37c234b7a222cb15947d8c7c067..5b4d7010427536903b68439f7eece08b8c2409b3 100644 (file)
@@ -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);