diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-01-08 22:53:20 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-01-08 22:53:20 +0000 |
commit | 697bbc3f6e8345b50532b0059917ea6ab6c6e8c7 (patch) | |
tree | c7ad9e6d3d7b86c201aaecf9a0017fb8badea1c3 /gcc/stor-layout.c | |
parent | ca09a9d4228019df2bd543d0b1619f2762e72cf8 (diff) | |
download | gcc-697bbc3f6e8345b50532b0059917ea6ab6c6e8c7.tar.gz |
2007-01-08 Richard Guenther <rguenther@suse.de>
* tree.h (build_int_cst_wide_type): Export.
* tree.c (build_int_cst_wide_type): New function.
(build_int_cst_wide): Fix comment.
* builtins.c (fold_builtin_object_size): Use build_int_cst
to build -1 or 0 of the correct type. Use fit_double_type
to check for overflow.
* fold-const.c (optimize_bit_field_compare): Use build_int_cst_type
to build the mask.
(decode_field_reference): Likewise.
(all_ones_mask_p): Likewise.
(native_interpret_int): Use build_int_cst_wide_type.
(fold_binary): Use build_int_cst_type to build an all-ones
value.
* stor-layout.c (set_sizetype): Use build_int_cst_wide_type.
java/
* lex.c (do_java_lex): Use build_int_cst_wide_type.
* jcf-parse.c (get_constant): Likewise.
cp/
* cvt.c (cp_convert_to_pointer): Use build_int_cst_type.
ada/
* cuintp.c (build_cst_from_int): Use built_int_cst_type.
* trans.c (gnat_to_gnu): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@120596 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/stor-layout.c')
-rw-r--r-- | gcc/stor-layout.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/gcc/stor-layout.c b/gcc/stor-layout.c index 61879a060a3..c1c81c3e6d5 100644 --- a/gcc/stor-layout.c +++ b/gcc/stor-layout.c @@ -2003,14 +2003,11 @@ set_sizetype (tree type) orig_max = TYPE_MAX_VALUE (sizetype); - /* Build a new node with the same values, but a different type. */ - new_max = build_int_cst_wide (sizetype, - TREE_INT_CST_LOW (orig_max), - TREE_INT_CST_HIGH (orig_max)); - - /* Now sign extend it using force_fit_type to ensure - consistency. */ - new_max = force_fit_type (new_max, 0, 0, 0); + /* Build a new node with the same values, but a different type. + Sign extend it to ensure consistency. */ + new_max = build_int_cst_wide_type (sizetype, + TREE_INT_CST_LOW (orig_max), + TREE_INT_CST_HIGH (orig_max)); TYPE_MAX_VALUE (sizetype) = new_max; } } |