summaryrefslogtreecommitdiff
path: root/gcc/stor-layout.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/stor-layout.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/stor-layout.c')
-rw-r--r--gcc/stor-layout.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/gcc/stor-layout.c b/gcc/stor-layout.c
index 1057bbbbabd..cad3f5c23dc 100644
--- a/gcc/stor-layout.c
+++ b/gcc/stor-layout.c
@@ -2198,11 +2198,10 @@ layout_type (tree type)
&& TYPE_UNSIGNED (TREE_TYPE (lb))
&& tree_int_cst_lt (ub, lb))
{
- unsigned prec = TYPE_PRECISION (TREE_TYPE (lb));
lb = wide_int_to_tree (ssizetype,
- wi::sext (addr_wide_int (lb), prec));
+ addr_wide_int::from (lb, SIGNED));
ub = wide_int_to_tree (ssizetype,
- wi::sext (addr_wide_int (ub), prec));
+ addr_wide_int::from (ub, SIGNED));
}
length
= fold_convert (sizetype,