diff options
author | Kaveh R. Ghazi <ghazi@caip.rutgers.edu> | 2009-09-20 15:39:22 +0000 |
---|---|---|
committer | Kaveh Ghazi <ghazi@gcc.gnu.org> | 2009-09-20 15:39:22 +0000 |
commit | ca75b926331a12b6323284f80617a6fe3afa1e38 (patch) | |
tree | 659746d75cac0bc57cdf3050c02e53c1fd81275e /gcc/fold-const.c | |
parent | c4a80a2df36df59ceedcd1236dea299cba12349f (diff) | |
download | gcc-ca75b926331a12b6323284f80617a6fe3afa1e38.zip gcc-ca75b926331a12b6323284f80617a6fe3afa1e38.tar.gz gcc-ca75b926331a12b6323284f80617a6fe3afa1e38.tar.bz2 |
re PR middle-end/30789 (complex folding inexact)
PR middle-end/30789
* builtins.c (do_mpc_arg2): Accept DO_NONFINITE parameter.
(do_mpc_ckconv): Accept FORCE_CONVERT parameter.
(fold_builtin_2, do_mpc_arg1): Update accordingly.
* fold-const.c (const_binop): Likewise.
* real.h (do_mpc_arg2): Update prototype.
testsuite:
* gcc.dg/torture/builtin-math-7.c: Update for testing Annex G
cases in static initializers.
From-SVN: r151904
Diffstat (limited to 'gcc/fold-const.c')
-rw-r--r-- | gcc/fold-const.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/gcc/fold-const.c b/gcc/fold-const.c index 1ce0013..34e47c1 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -1974,7 +1974,9 @@ const_binop (enum tree_code code, tree arg1, tree arg2, int notrunc) case MULT_EXPR: #ifdef HAVE_mpc if (COMPLEX_FLOAT_TYPE_P (type)) - return do_mpc_arg2 (arg1, arg2, type, mpc_mul); + return do_mpc_arg2 (arg1, arg2, type, + /* do_nonfinite= */ folding_initializer, + mpc_mul); #endif real = const_binop (MINUS_EXPR, @@ -1990,7 +1992,9 @@ const_binop (enum tree_code code, tree arg1, tree arg2, int notrunc) case RDIV_EXPR: #ifdef HAVE_mpc if (COMPLEX_FLOAT_TYPE_P (type)) - return do_mpc_arg2 (arg1, arg2, type, mpc_div); + return do_mpc_arg2 (arg1, arg2, type, + /* do_nonfinite= */ folding_initializer, + mpc_div); #endif { |