summaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-ccp.c
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2011-01-03 21:01:14 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2011-01-03 21:01:14 +0000
commitc983166332284b7e36d9f0225f15121f2f9fd73a (patch)
tree1af17073eafbd986218e00720fb3527786e46d23 /gcc/tree-ssa-ccp.c
parentaf9b9305f1411dd3b55003c73336893f7b523d06 (diff)
downloadgcc-c983166332284b7e36d9f0225f15121f2f9fd73a.tar.gz
PR tree-optimization/47155
* tree-ssa-ccp.c (bit_value_binop_1): Use r1type instead of type when computing uns. * gcc.c-torture/execute/pr47155.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@168440 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-ccp.c')
-rw-r--r--gcc/tree-ssa-ccp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/tree-ssa-ccp.c b/gcc/tree-ssa-ccp.c
index 29aa55c7ba2..b2494d72476 100644
--- a/gcc/tree-ssa-ccp.c
+++ b/gcc/tree-ssa-ccp.c
@@ -1764,8 +1764,8 @@ bit_value_binop_1 (enum tree_code code, tree type,
tree r1type, double_int r1val, double_int r1mask,
tree r2type, double_int r2val, double_int r2mask)
{
- bool uns = (TREE_CODE (type) == INTEGER_TYPE
- && TYPE_IS_SIZETYPE (type) ? 0 : TYPE_UNSIGNED (type));
+ bool uns = (TREE_CODE (r1type) == INTEGER_TYPE
+ && TYPE_IS_SIZETYPE (r1type) ? 0 : TYPE_UNSIGNED (r1type));
/* Assume we'll get a constant result. Use an initial varying value,
we fall back to varying in the end if necessary. */
*mask = double_int_minus_one;