aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree.c')
-rw-r--r--gcc/tree.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/gcc/tree.c b/gcc/tree.c
index bfcf374..f78a2c2 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -1877,6 +1877,14 @@ build_real (tree type, REAL_VALUE_TYPE d)
return v;
}
+/* Like build_real, but first truncate D to the type. */
+
+tree
+build_real_truncate (tree type, REAL_VALUE_TYPE d)
+{
+ return build_real (type, real_value_truncate (TYPE_MODE (type), d));
+}
+
/* Return a new REAL_CST node whose type is TYPE
and whose value is the integer value of the INTEGER_CST node I. */
@@ -12093,7 +12101,7 @@ strip_float_extensions (tree exp)
&& exact_real_truncate (TYPE_MODE (double_type_node), &orig))
type = double_type_node;
if (type)
- return build_real (type, real_value_truncate (TYPE_MODE (type), orig));
+ return build_real_truncate (type, orig);
}
if (!CONVERT_EXPR_P (exp))