OSDN Git Service

Daily bump.
[pf3gnuchains/gcc-fork.git] / gcc / print-tree.c
index d247835..02e5c7b 100644 (file)
@@ -50,7 +50,7 @@ static struct bucket **table;
 void
 debug_tree (tree node)
 {
-  table = xcalloc (HASH_SIZE, sizeof (struct bucket *));
+  table = XCNEWVEC (struct bucket *, HASH_SIZE);
   print_node (stderr, "", node, 0);
   free (table);
   table = 0;
@@ -209,7 +209,7 @@ print_node (FILE *file, const char *prefix, tree node, int indent)
       }
 
   /* Add this node to the table.  */
-  b = xmalloc (sizeof (struct bucket));
+  b = XNEW (struct bucket);
   b->node = node;
   b->next = table[hash];
   table[hash] = b;
@@ -506,6 +506,19 @@ print_node (FILE *file, const char *prefix, tree node, int indent)
                   (void *) DECL_STRUCT_FUNCTION (node));
        }
 
+      if ((TREE_CODE (node) == VAR_DECL || TREE_CODE (node) == PARM_DECL)
+         && DECL_HAS_VALUE_EXPR_P (node))
+       print_node (file, "value-expr", DECL_VALUE_EXPR (node), indent + 4);
+
+      if (TREE_CODE (node) == STRUCT_FIELD_TAG)
+       {
+         fprintf (file, " sft size " HOST_WIDE_INT_PRINT_DEC, 
+                  SFT_SIZE (node));
+         fprintf (file, " sft offset " HOST_WIDE_INT_PRINT_DEC,
+                  SFT_OFFSET (node));
+         print_node_brief (file, "parent var", SFT_PARENT_VAR (node), 
+                           indent + 4);
+       }
       /* Print the decl chain only if decl is at second level.  */
       if (indent == 4)
        print_node (file, "chain", TREE_CHAIN (node), indent + 4);
@@ -821,6 +834,20 @@ print_node (FILE *file, const char *prefix, tree node, int indent)
            }
          break;
 
+       case OMP_CLAUSE:
+           {
+             int i;
+             fprintf (file, " %s",
+                      omp_clause_code_name[OMP_CLAUSE_CODE (node)]);
+             for (i = 0; i < omp_clause_num_ops[OMP_CLAUSE_CODE (node)]; i++)
+               {
+                 indent_to (file, indent + 4);
+                 fprintf (file, "op %d:", i);
+                 print_node_brief (file, "", OMP_CLAUSE_OPERAND (node, i), 0);
+               }
+           }
+         break;
+
        default:
          if (EXCEPTIONAL_CLASS_P (node))
            lang_hooks.print_xnode (file, node, indent);