diff options
author | Andrew Haley <aph@redhat.com> | 2008-12-08 12:30:24 +0000 |
---|---|---|
committer | Andrew Haley <aph@gcc.gnu.org> | 2008-12-08 12:30:24 +0000 |
commit | cb4ad1803bb18a23d347385e3d8b83fd6a981d9e (patch) | |
tree | a40e4e4be9ff9a6bd850682dfafca2001ca9643a /gcc/fixed-value.c | |
parent | a5d137be06367ea715356dfd14b2683ac607e191 (diff) | |
download | gcc-cb4ad1803bb18a23d347385e3d8b83fd6a981d9e.tar.gz |
gimple.h (gimple_build_try): Fix declaration.
2008-12-08 Andrew Haley <aph@redhat.com>
Kamaraju Kusumanchi <raju.mailinglists@gmail.com>
* gimple.h (gimple_build_try): Fix declaration.
* builtins.c (fold_builtin_sqrt): Don't use a conditional
operator.
* fixed-value.c (do_fixed_add): Likewise.
* tree-ssa-loop-ivopts.c (iv_ca_cost): Likewise.
Co-Authored-By: Kamaraju Kusumanchi <raju.mailinglists@gmail.com>
From-SVN: r142549
Diffstat (limited to 'gcc/fixed-value.c')
-rw-r--r-- | gcc/fixed-value.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/gcc/fixed-value.c b/gcc/fixed-value.c index 8c8d3719044..26aaa023c84 100644 --- a/gcc/fixed-value.c +++ b/gcc/fixed-value.c @@ -291,9 +291,17 @@ do_fixed_add (FIXED_VALUE_TYPE *f, const FIXED_VALUE_TYPE *a, const FIXED_VALUE_TYPE *b, bool subtract_p, bool sat_p) { bool overflow_p = false; - double_int temp = subtract_p ? double_int_neg (b->data) : b->data; - bool unsigned_p = UNSIGNED_FIXED_POINT_MODE_P (a->mode); - int i_f_bits = GET_MODE_IBIT (a->mode) + GET_MODE_FBIT (a->mode); + bool unsigned_p; + double_int temp; + int i_f_bits; + + if (subtract_p) + temp = double_int_neg (b->data); + else + temp = b->data; + + unsigned_p = UNSIGNED_FIXED_POINT_MODE_P (a->mode); + i_f_bits = GET_MODE_IBIT (a->mode) + GET_MODE_FBIT (a->mode); f->mode = a->mode; f->data = double_int_add (a->data, temp); if (unsigned_p) /* Unsigned type. */ |