]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
builtins.c (do_mpc_ckconv, [...]): Use mpc_realref/mpc_imagref instead of MPC_RE...
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>
Fri, 5 Jun 2009 16:20:25 +0000 (16:20 +0000)
committerKaveh Ghazi <ghazi@gcc.gnu.org>
Fri, 5 Jun 2009 16:20:25 +0000 (16:20 +0000)
* builtins.c (do_mpc_ckconv, do_mpc_arg1): Use
mpc_realref/mpc_imagref instead of MPC_RE/MPC_IM.

fortran:
* simplify.c (call_mpc_func): Use mpc_realref/mpc_imagref
instead of MPC_RE/MPC_IM.

From-SVN: r148213

gcc/ChangeLog
gcc/builtins.c
gcc/fortran/ChangeLog
gcc/fortran/simplify.c

index b06f7e4966726750342c7de521916593aca61513..9efd18824962adea2a2dca87958eedf8426cf0a2 100644 (file)
@@ -1,3 +1,8 @@
+2009-06-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
+
+       * builtins.c (do_mpc_ckconv, do_mpc_arg1): Use
+       mpc_realref/mpc_imagref instead of MPC_RE/MPC_IM.
+
 2009-06-05  Jakub Jelinek  <jakub@redhat.com>
 
        PR middle-end/40340
index 80ff09d26bd44460e45fea73c58558ae56be4fd2..a555e4fa14bec2a0bc8802d92e52497a307b0638 100644 (file)
@@ -13216,21 +13216,21 @@ do_mpc_ckconv (mpc_srcptr m, tree type, int inexact)
   /* Proceed iff we get a normal number, i.e. not NaN or Inf and no
      overflow/underflow occurred.  If -frounding-math, proceed iff the
      result of calling FUNC was exact.  */
-  if (mpfr_number_p (MPC_RE (m)) && mpfr_number_p (MPC_IM (m))
+  if (mpfr_number_p (mpc_realref (m)) && mpfr_number_p (mpc_imagref (m))
       && !mpfr_overflow_p () && !mpfr_underflow_p ()
       && (!flag_rounding_math || !inexact))
     {
       REAL_VALUE_TYPE re, im;
 
-      real_from_mpfr (&re, MPC_RE (m), type, GMP_RNDN);
-      real_from_mpfr (&im, MPC_IM (m), type, GMP_RNDN);
+      real_from_mpfr (&re, mpc_realref (m), type, GMP_RNDN);
+      real_from_mpfr (&im, mpc_imagref (m), type, GMP_RNDN);
       /* Proceed iff GCC's REAL_VALUE_TYPE can hold the MPFR values,
         check for overflow/underflow.  If the REAL_VALUE_TYPE is zero
         but the mpft_t is not, then we underflowed in the
         conversion.  */
       if (real_isfinite (&re) && real_isfinite (&im)
-         && (re.cl == rvc_zero) == (mpfr_zero_p (MPC_RE (m)) != 0)
-         && (im.cl == rvc_zero) == (mpfr_zero_p (MPC_IM (m)) != 0))
+         && (re.cl == rvc_zero) == (mpfr_zero_p (mpc_realref (m)) != 0)
+         && (im.cl == rvc_zero) == (mpfr_zero_p (mpc_imagref (m)) != 0))
         {
          REAL_VALUE_TYPE re_mode, im_mode;
 
@@ -13676,8 +13676,8 @@ do_mpc_arg1 (tree arg, tree type, int (*func)(mpc_ptr, mpc_srcptr, mpc_rnd_t))
          mpc_t m;
          
          mpc_init2 (m, prec);
-         mpfr_from_real (MPC_RE(m), re, rnd);
-         mpfr_from_real (MPC_IM(m), im, rnd);
+         mpfr_from_real (mpc_realref(m), re, rnd);
+         mpfr_from_real (mpc_imagref(m), im, rnd);
          mpfr_clear_flags ();
          inexact = func (m, m, crnd);
          result = do_mpc_ckconv (m, type, inexact);
index eda5dfe753689375483e2735779c674d7ac2911e..5eacd0f6bbef638c75763c3ffc381ec7191515da 100644 (file)
@@ -1,3 +1,8 @@
+2009-06-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
+
+       * simplify.c (call_mpc_func): Use mpc_realref/mpc_imagref
+       instead of MPC_RE/MPC_IM.
+
 2009-06-05  Alexandre Oliva  <aoliva@redhat.com>
 
        * trans-decl.c (gfc_build_qualified_array): Don't skip generation
index 98df0edd9580449b3a1fb7a1eb22f94330886b07..fea1b91779ff72afc698d12f121f871d1ae19f88 100644 (file)
@@ -223,8 +223,8 @@ call_mpc_func (mpfr_ptr result_re, mpfr_ptr result_im,
   mpc_init2 (c, mpfr_get_default_prec());
   mpc_set_fr_fr (c, input_re, input_im, GFC_MPC_RND_MODE);
   func (c, c, GFC_MPC_RND_MODE);
-  mpfr_set (result_re, MPC_RE (c), GFC_RND_MODE);
-  mpfr_set (result_im, MPC_IM (c), GFC_RND_MODE);
+  mpfr_set (result_re, mpc_realref (c), GFC_RND_MODE);
+  mpfr_set (result_im, mpc_imagref (c), GFC_RND_MODE);
   mpc_clear (c);
 }
 #endif