OSDN Git Service

2004-05-17 Steve Kargl <kargls@comcast.net>
authortobi <tobi@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 17 May 2004 23:19:47 +0000 (23:19 +0000)
committertobi <tobi@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 17 May 2004 23:19:47 +0000 (23:19 +0000)
* arith.c (gfc_real2complex): Range checking wrong part of complex
        number.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@81957 138bc75d-0d04-0410-961f-82ee72b054a4

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

index 535840c..1fed01a 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 7d47151..5b4d701 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);