summaryrefslogtreecommitdiff
path: root/gcc/c-common.c
diff options
context:
space:
mode:
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2007-01-08 23:07:44 +0000
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2007-01-08 23:07:44 +0000
commitc8110c8f36a28548bd52fdda7a65dcf3bae3443d (patch)
treeb906bda57fe5b087786f0082a6716e47d14d48b7 /gcc/c-common.c
parent697bbc3f6e8345b50532b0059917ea6ab6c6e8c7 (diff)
downloadgcc-c8110c8f36a28548bd52fdda7a65dcf3bae3443d.tar.gz
2007-01-08 Richard Guenther <rguenther@suse.de>
* tree.h (force_fit_type_double): Export. (force_fit_type): Remove. * fold-const.c (force_fit_type_double): New function. (force_fit_type): Remove. (int_const_binop): Use it. (fold_convert_const_int_from_int): Likewise. (fold_convert_const_int_from_real): Likewise. (fold_div_compare): Likewise. (fold_sign_changed_comparison): Likewise. (fold_unary): Likewise. (fold_negate_const): Likewise. (fold_abs_const): Likewise. (fold_not_const): Likewise. * c-common.c (shorten_compare): Use force_fit_type_double. * convert.c (convert_to_pointer): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@120597 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-common.c')
-rw-r--r--gcc/c-common.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/gcc/c-common.c b/gcc/c-common.c
index ef4c2e86bc5..c1661b23a3d 100644
--- a/gcc/c-common.c
+++ b/gcc/c-common.c
@@ -2316,12 +2316,11 @@ shorten_compare (tree *op0_ptr, tree *op1_ptr, tree *restype_ptr,
{
/* Convert primop1 to target type, but do not introduce
additional overflow. We know primop1 is an int_cst. */
- tree tmp = build_int_cst_wide (*restype_ptr,
- TREE_INT_CST_LOW (primop1),
- TREE_INT_CST_HIGH (primop1));
-
- primop1 = force_fit_type (tmp, 0, TREE_OVERFLOW (primop1),
- TREE_CONSTANT_OVERFLOW (primop1));
+ primop1 = force_fit_type_double (*restype_ptr,
+ TREE_INT_CST_LOW (primop1),
+ TREE_INT_CST_HIGH (primop1), 0,
+ TREE_OVERFLOW (primop1),
+ TREE_CONSTANT_OVERFLOW (primop1));
}
if (type != *restype_ptr)
{