diff options
author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-08-13 12:39:54 +0000 |
---|---|---|
committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-08-13 12:39:54 +0000 |
commit | e0e5e0b3c95ee6d12424deaa2ceba6eb5d2be9f3 (patch) | |
tree | ad4832638401fe5e5c7f1ec4cd85012761658f24 /gcc/double-int.c | |
parent | 025093891ca1408e643cb065bcf26bcecce295c9 (diff) | |
download | gcc-e0e5e0b3c95ee6d12424deaa2ceba6eb5d2be9f3.tar.gz |
PR c/53968
* tree.c (integer_pow2p): Avoid undefined signed overflows.
* simplify-rtx.c (neg_const_int): Likewise.
* expr.c (fixup_args_size_notes): Likewise.
* stor-layout.c (set_min_and_max_values_for_integral_type): Likewise.
* double-int.c (mul_double_wide_with_sign): Likewise.
(double_int_mask): Likewise.
* tree-ssa-loop-ivopts.c (get_address_cost): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@190342 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/double-int.c')
-rw-r--r-- | gcc/double-int.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/double-int.c b/gcc/double-int.c index 1204dc77aad..ea518e3b411 100644 --- a/gcc/double-int.c +++ b/gcc/double-int.c @@ -170,7 +170,7 @@ mul_double_wide_with_sign (unsigned HOST_WIDE_INT l1, HOST_WIDE_INT h1, { k = i + j; /* This product is <= 0xFFFE0001, the sum <= 0xFFFF0000. */ - carry += arg1[i] * arg2[j]; + carry += (unsigned HOST_WIDE_INT) arg1[i] * arg2[j]; /* Since prod[p] < 0xFFFF, this sum <= 0xFFFFFFFF. */ carry += prod[k]; prod[k] = LOWPART (carry); @@ -625,7 +625,7 @@ double_int_mask (unsigned prec) else { mask.high = 0; - mask.low = ((unsigned HOST_WIDE_INT) 2 << (prec - 1)) - 1; + mask.low = prec ? ((unsigned HOST_WIDE_INT) 2 << (prec - 1)) - 1 : 0; } return mask; |