diff options
-rw-r--r-- | gcc/fortran/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/fortran/arith.c | 5 | ||||
-rw-r--r-- | gcc/fortran/gfortran.h | 1 |
3 files changed, 10 insertions, 1 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 5035c1b..9fac2a7 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,8 @@ +2009-10-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> + + * arith.c (arith_power): Use mpc_pow_z. + * gfortran.h (HAVE_mpc_pow_z): Define. + 2009-10-07 Daniel Kraft <d@domob.eu> PR fortran/41615 diff --git a/gcc/fortran/arith.c b/gcc/fortran/arith.c index dddf7e0..82a43ad 100644 --- a/gcc/fortran/arith.c +++ b/gcc/fortran/arith.c @@ -1111,7 +1111,10 @@ arith_power (gfc_expr *op1, gfc_expr *op2, gfc_expr **resultp) case BT_COMPLEX: { -#ifdef HAVE_mpc_pow +#ifdef HAVE_mpc_pow_z + mpc_pow_z (result->value.complex, op1->value.complex, + op2->value.integer, GFC_MPC_RND_MODE); +#elif defined(HAVE_mpc_pow) mpc_t apower; gfc_set_model (mpc_realref (op1->value.complex)); mpc_init2 (apower, mpfr_get_default_prec()); diff --git a/gcc/fortran/gfortran.h b/gcc/fortran/gfortran.h index 72f0126..d6ad992 100644 --- a/gcc/fortran/gfortran.h +++ b/gcc/fortran/gfortran.h @@ -1629,6 +1629,7 @@ gfc_class_esym_list; # endif # if MPC_VERSION >= MPC_VERSION_NUM(0,7,1) # define HAVE_mpc_arc +# define HAVE_mpc_pow_z # endif #else #define mpc_realref(X) ((X).r) |