summaryrefslogtreecommitdiff
path: root/gcc/tree-pretty-print.c
diff options
context:
space:
mode:
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2007-01-08 18:29:18 +0000
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2007-01-08 18:29:18 +0000
commit167a3fa54362dcfe6cb3ef3b92e1d27784c415c4 (patch)
tree39d3113999a59bc49ff73a06408842ee861973fd /gcc/tree-pretty-print.c
parent06dd9e696544873a14db4c5f832fef0c42f719fd (diff)
downloadgcc-167a3fa54362dcfe6cb3ef3b92e1d27784c415c4.tar.gz
2007-01-08 Richard Guenther <rguenther@suse.de>
* tree-ssa-ccp.c (maybe_fold_offset_to_array_ref): Use type of offset to build the index. * tree-pretty-print.c (dump_generic_node): Don't build negated const just for printing. * c-pretty-print.c (pp_c_integer_constant): Likewise. * builtins.c (fold_builtin_int_roundingfn): Check if result fits the type by using force_fit_type and comparing the result. * predict.c (predict_loops): Use compare_tree_int for comparison. * tree.c (build_int_cst): Fall back to integer_type_node for NULL_TREE type. (build_int_cst_wide): Assert type is non-null. fortran/ * trans-io.c (transfer_array_desc): Use build_int_cst instead of build_int_cstu. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@120586 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-pretty-print.c')
-rw-r--r--gcc/tree-pretty-print.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/gcc/tree-pretty-print.c b/gcc/tree-pretty-print.c
index 7d895a1b4c7..d9d4b968a32 100644
--- a/gcc/tree-pretty-print.c
+++ b/gcc/tree-pretty-print.c
@@ -748,23 +748,20 @@ dump_generic_node (pretty_printer *buffer, tree node, int spc, int flags,
else if (! host_integerp (node, 0))
{
tree val = node;
+ unsigned HOST_WIDE_INT low = TREE_INT_CST_LOW (val);
+ HOST_WIDE_INT high = TREE_INT_CST_HIGH (val);
if (tree_int_cst_sgn (val) < 0)
{
pp_character (buffer, '-');
- val = build_int_cst_wide (NULL_TREE,
- -TREE_INT_CST_LOW (val),
- ~TREE_INT_CST_HIGH (val)
- + !TREE_INT_CST_LOW (val));
+ high = ~high + !low;
+ low = -low;
}
/* Would "%x%0*x" or "%x%*0x" get zero-padding on all
systems? */
- {
- sprintf (pp_buffer (buffer)->digit_buffer, HOST_WIDE_INT_PRINT_DOUBLE_HEX,
- TREE_INT_CST_HIGH (val),
- TREE_INT_CST_LOW (val));
- pp_string (buffer, pp_buffer (buffer)->digit_buffer);
- }
+ sprintf (pp_buffer (buffer)->digit_buffer,
+ HOST_WIDE_INT_PRINT_DOUBLE_HEX, high, low);
+ pp_string (buffer, pp_buffer (buffer)->digit_buffer);
}
else
pp_wide_integer (buffer, TREE_INT_CST_LOW (node));