diff options
author | ebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-04-18 21:49:29 +0000 |
---|---|---|
committer | ebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-04-18 21:49:29 +0000 |
commit | ad086ed471d513856fff3cf8325b8d5e0ee571a4 (patch) | |
tree | abb5e5a28274a29b2192f0299a551011760fbf42 /gcc/fold-const.c | |
parent | f9f6abc1cfff767ccf5f3247d99b94e1f072d9a1 (diff) | |
download | gcc-ad086ed471d513856fff3cf8325b8d5e0ee571a4.tar.gz |
2010-04-18 Eric Botcazou <ebotcazou@adacore.com>
* fold-const.c (fold_comparison): Use ssizetype.
* gimple-fold.c (maybe_fold_offset_to_array_ref): Likewise.
* ipa-prop.c (ipa_modify_call_arguments): Use sizetype.
* tree-loop-distribution.c (build_size_arg_loc): Likewise.
* tree-object-size.c (compute_object_sizes): Use size_type_node.
* tree.h (initialize_sizetypes): Remove parameter.
(build_common_tree_nodes): Remove second parameter.
* stor-layout.c (initialize_sizetypes): Remove parameter.
Always create an unsigned type.
(set_sizetype): Assert that the passed type is unsigned and simplify.
* tree.c (build_common_tree_nodes): Remove second parameter.
Adjust call to initialize_sizetypes.
* c-decl.c (c_init_decl_processing): Remove second argument in call to
build_common_tree_nodes.
cp/
* decl.c (cxx_init_decl_processing): Remove second argument in call to
build_common_tree_nodes.
java/
* decl.c (java_init_decl_processing): Remove argument in call to
initialize_sizetypes
fortran/
* f95-lang.c (gfc_init_decl_processing): Remove second argument in call
to build_common_tree_nodes.
ada/
* gcc-interface/misc.c (gnat_init): Remove second argument in call to
build_common_tree_nodes.
lto/
* lto-lang.c (lto_init): Remove second argument in call to
build_common_tree_nodes.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@158496 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fold-const.c')
-rw-r--r-- | gcc/fold-const.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/gcc/fold-const.c b/gcc/fold-const.c index c1af8248a39..85f9cd1fd91 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -8695,24 +8695,19 @@ fold_comparison (location_t loc, enum tree_code code, tree type, && ((code == EQ_EXPR || code == NE_EXPR) || POINTER_TYPE_OVERFLOW_UNDEFINED)) { - tree signed_size_type_node; - signed_size_type_node = signed_type_for (size_type_node); - /* By converting to signed size type we cover middle-end pointer arithmetic which operates on unsigned pointer types of size type size and ARRAY_REF offsets which are properly sign or zero extended from their type in case it is narrower than size type. */ if (offset0 == NULL_TREE) - offset0 = build_int_cst (signed_size_type_node, 0); + offset0 = build_int_cst (ssizetype, 0); else - offset0 = fold_convert_loc (loc, signed_size_type_node, - offset0); + offset0 = fold_convert_loc (loc, ssizetype, offset0); if (offset1 == NULL_TREE) - offset1 = build_int_cst (signed_size_type_node, 0); + offset1 = build_int_cst (ssizetype, 0); else - offset1 = fold_convert_loc (loc, signed_size_type_node, - offset1); + offset1 = fold_convert_loc (loc, ssizetype, offset1); if (code != EQ_EXPR && code != NE_EXPR |