summaryrefslogtreecommitdiff
path: root/gcc/double-int.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/double-int.c')
-rw-r--r--gcc/double-int.c4
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;