summaryrefslogtreecommitdiff
path: root/gcc/expr.c
diff options
context:
space:
mode:
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2013-10-23 12:12:09 +0000
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2013-10-23 12:12:09 +0000
commitcc5bf44923387bd79ed1834707b6462ad3d9b022 (patch)
tree57bcca6fb68e7c0a7b2adddcdc4cfc3e5b6cb1c6 /gcc/expr.c
parent5b2cae25833ee97389f5271a777b44f0cafea204 (diff)
downloadgcc-cc5bf44923387bd79ed1834707b6462ad3d9b022.tar.gz
Always treat trees as having their native precision by default.
Add wi::extend() and wi::address() to convert them to max_wide_int and addr_wide_int. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/wide-int@203961 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/expr.c')
-rw-r--r--gcc/expr.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/expr.c b/gcc/expr.c
index f71435dd571..1dc0aef39bc 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -6581,7 +6581,7 @@ get_inner_reference (tree exp, HOST_WIDE_INT *pbitsize,
switch (TREE_CODE (exp))
{
case BIT_FIELD_REF:
- bit_offset += TREE_OPERAND (exp, 2);
+ bit_offset += wi::address (TREE_OPERAND (exp, 2));
break;
case COMPONENT_REF:
@@ -6596,7 +6596,7 @@ get_inner_reference (tree exp, HOST_WIDE_INT *pbitsize,
break;
offset = size_binop (PLUS_EXPR, offset, this_offset);
- bit_offset += DECL_FIELD_BIT_OFFSET (field);
+ bit_offset += wi::address (DECL_FIELD_BIT_OFFSET (field));
/* ??? Right now we don't do anything with DECL_OFFSET_ALIGN. */
}
@@ -6675,7 +6675,7 @@ get_inner_reference (tree exp, HOST_WIDE_INT *pbitsize,
this conversion. */
if (TREE_CODE (offset) == INTEGER_CST)
{
- addr_wide_int tem = wi::sext (addr_wide_int (offset),
+ addr_wide_int tem = wi::sext (wi::address (offset),
TYPE_PRECISION (sizetype));
tem = wi::lshift (tem, (BITS_PER_UNIT == 8
? 3 : exact_log2 (BITS_PER_UNIT)));