summaryrefslogtreecommitdiff
path: root/gcc/fold-const.c
diff options
context:
space:
mode:
authorzadeck <zadeck@138bc75d-0d04-0410-961f-82ee72b054a4>2013-12-02 19:56:40 +0000
committerzadeck <zadeck@138bc75d-0d04-0410-961f-82ee72b054a4>2013-12-02 19:56:40 +0000
commit77d15f371fb1e5a4dcb0459bd85ca97d9c2faace (patch)
tree3a4bea6c6281bbf7bddaea5765c398677533c773 /gcc/fold-const.c
parentd1314cdbf23748ad5c8f42ecab0f7260d8af470a (diff)
downloadgcc-77d15f371fb1e5a4dcb0459bd85ca97d9c2faace.tar.gz
[wide-int] remove wi::mul_high
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/wide-int@205599 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fold-const.c')
-rw-r--r--gcc/fold-const.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/gcc/fold-const.c b/gcc/fold-const.c
index 3456e1fd2bf..5f8b05dbe12 100644
--- a/gcc/fold-const.c
+++ b/gcc/fold-const.c
@@ -5962,11 +5962,12 @@ extract_muldiv_1 (tree t, tree c, enum tree_code code, tree wide_type,
assuming no overflow. */
if (tcode == code)
{
- bool overflow_p;
+ bool overflow_p = false;
+ bool overflow_mul_p;
signop sign = TYPE_SIGN (ctype);
- wide_int mul = wi::mul_full (op1, c, sign);
+ wide_int mul = wi::mul (op1, c, sign, &overflow_mul_p);
overflow_p = TREE_OVERFLOW (c) | TREE_OVERFLOW (op1);
- if (!wi::fits_to_tree_p (mul, ctype)
+ if (overflow_mul_p
&& ((sign == UNSIGNED && tcode != MULT_EXPR) || sign == SIGNED))
overflow_p = true;
if (!overflow_p)