]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - gcc/print-tree.c
Merge with trunk.
[thirdparty/gcc.git] / gcc / print-tree.c
index 5916c523f9d4af0189ce35db351dece919a3ed01..f9e03424c36f6ea2de5090c474e6d231e7bd279e 100644 (file)
@@ -32,6 +32,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "tree-cfg.h"
 #include "tree-dump.h"
 #include "dumpfile.h"
+#include "wide-int-print.h"
 
 /* Define the hash table of nodes already seen.
    Such nodes are not repeated; brief cross-references are used.  */
@@ -122,16 +123,7 @@ print_node_brief (FILE *file, const char *prefix, const_tree node, int indent)
        fprintf (file, " overflow");
 
       fprintf (file, " ");
-      if (TREE_INT_CST_HIGH (node) == 0)
-       fprintf (file, HOST_WIDE_INT_PRINT_UNSIGNED, TREE_INT_CST_LOW (node));
-      else if (TREE_INT_CST_HIGH (node) == -1
-              && TREE_INT_CST_LOW (node) != 0)
-       fprintf (file, "-" HOST_WIDE_INT_PRINT_UNSIGNED,
-                -TREE_INT_CST_LOW (node));
-      else
-       fprintf (file, HOST_WIDE_INT_PRINT_DOUBLE_HEX,
-                (unsigned HOST_WIDE_INT) TREE_INT_CST_HIGH (node),
-                (unsigned HOST_WIDE_INT) TREE_INT_CST_LOW (node));
+      print_dec (node, file, TYPE_SIGN (TREE_TYPE (node)));
     }
   if (TREE_CODE (node) == REAL_CST)
     {
@@ -338,7 +330,7 @@ print_node (FILE *file, const char *prefix, tree node, int indent)
   if (TREE_VISITED (node))
     fputs (" visited", file);
 
-  if (code != TREE_VEC && code != SSA_NAME)
+  if (code != TREE_VEC && code != INTEGER_CST && code != SSA_NAME)
     {
       if (TREE_LANG_FLAG_0 (node))
        fputs (" tree_0", file);
@@ -744,17 +736,7 @@ print_node (FILE *file, const char *prefix, tree node, int indent)
            fprintf (file, " overflow");
 
          fprintf (file, " ");
-         if (TREE_INT_CST_HIGH (node) == 0)
-           fprintf (file, HOST_WIDE_INT_PRINT_UNSIGNED,
-                    TREE_INT_CST_LOW (node));
-         else if (TREE_INT_CST_HIGH (node) == -1
-                  && TREE_INT_CST_LOW (node) != 0)
-           fprintf (file, "-" HOST_WIDE_INT_PRINT_UNSIGNED,
-                    -TREE_INT_CST_LOW (node));
-         else
-           fprintf (file, HOST_WIDE_INT_PRINT_DOUBLE_HEX,
-                    (unsigned HOST_WIDE_INT) TREE_INT_CST_HIGH (node),
-                    (unsigned HOST_WIDE_INT) TREE_INT_CST_LOW (node));
+         print_dec (node, file, TYPE_SIGN (TREE_TYPE (node)));
          break;
 
        case REAL_CST: