diff options
author | sayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-11-12 02:57:10 +0000 |
---|---|---|
committer | sayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-11-12 02:57:10 +0000 |
commit | 2455d3ef7f8435b1e21ac41493c8852d5f5dd619 (patch) | |
tree | 58a441d6fe7ffeccb38541fe24123167cc9fb14f /gcc/stor-layout.c | |
parent | 91605b2e1a8df1ec4222819c5ac62a782dcfb7da (diff) | |
download | gcc-2455d3ef7f8435b1e21ac41493c8852d5f5dd619.tar.gz |
* fold-const.c (int_binop_types_match_p): New function.
(size_binop): Relax constraint that both arguments must both have
exactly the same sizetype type. Instead use int_binop_types_match_p.
(size_diffop): Likewise.
(make_range): Use build_int_cst instead of fold_convert.
(fold_cond_expr_with_comparison): Use build_int_cst to construct
integer constants of the correct type.
(fold_div_compare): Likewise.
(fold_single_bit_test): Likewise.
(fold_binary): Likewise.
* stor-layout.c (layout_type) <VECTOR_TYPE>: Ensure that TYPE_SIZE
has type bitsizetype and TYPE_SIZE_UNIT has type sizetype.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@118718 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/stor-layout.c')
-rw-r--r-- | gcc/stor-layout.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/gcc/stor-layout.c b/gcc/stor-layout.c index 51db310bd48..ccbf9f7f319 100644 --- a/gcc/stor-layout.c +++ b/gcc/stor-layout.c @@ -1617,7 +1617,6 @@ layout_type (tree type) case VECTOR_TYPE: { int nunits = TYPE_VECTOR_SUBPARTS (type); - tree nunits_tree = build_int_cst (NULL_TREE, nunits); tree innertype = TREE_TYPE (type); gcc_assert (!(nunits & (nunits - 1))); @@ -1655,9 +1654,9 @@ layout_type (tree type) TYPE_UNSIGNED (type) = TYPE_UNSIGNED (TREE_TYPE (type)); TYPE_SIZE_UNIT (type) = int_const_binop (MULT_EXPR, TYPE_SIZE_UNIT (innertype), - nunits_tree, 0); + size_int (nunits), 0); TYPE_SIZE (type) = int_const_binop (MULT_EXPR, TYPE_SIZE (innertype), - nunits_tree, 0); + bitsize_int (nunits), 0); /* Always naturally align vectors. This prevents ABI changes depending on whether or not native vector modes are supported. */ |