summaryrefslogtreecommitdiffstats
path: root/gcc/c-common.c
diff options
context:
space:
mode:
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)
{
OpenPOWER on IntegriCloud