OSDN Git Service

* trans.h (struct gfc_ss): New field nested_ss.
[pf3gnuchains/gcc-fork.git] / gcc / print-tree.c
index 0c23188..1a1e33f 100644 (file)
@@ -50,7 +50,7 @@ static struct bucket **table;
    Most nodes referred to by this one are printed recursively
    down to a depth of six.  */
 
-void
+DEBUG_FUNCTION void
 debug_tree (tree node)
 {
   table = XCNEWVEC (struct bucket *, HASH_SIZE);
@@ -64,7 +64,7 @@ debug_tree (tree node)
    Most nodes referred to by this one are printed recursively
    down to a depth of six.  */
 
-void
+DEBUG_FUNCTION void
 debug_vec_tree (VEC(tree,gc) *vec)
 {
   table = XCNEWVEC (struct bucket *, HASH_SIZE);
@@ -321,7 +321,7 @@ print_node (FILE *file, const char *prefix, tree node, int indent)
       if (indent <= 4)
        print_node_brief (file, "type", TREE_TYPE (node), indent + 4);
     }
-  else
+  else if (CODE_CONTAINS_STRUCT (code, TS_TYPED))
     {
       print_node (file, "type", TREE_TYPE (node), indent + 4);
       if (TREE_TYPE (node))
@@ -439,6 +439,8 @@ print_node (FILE *file, const char *prefix, tree node, int indent)
 
       if (code == VAR_DECL && DECL_IN_TEXT_SECTION (node))
        fputs (" in-text-section", file);
+      if (code == VAR_DECL && DECL_IN_CONSTANT_POOL (node))
+       fputs (" in-constant-pool", file);
       if (code == VAR_DECL && DECL_COMMON (node))
        fputs (" common", file);
       if (code == VAR_DECL && DECL_THREAD_LOCAL_P (node))
@@ -754,7 +756,8 @@ print_node (FILE *file, const char *prefix, tree node, int indent)
              print_node (file, temp, TREE_OPERAND (node, i), indent + 4);
            }
        }
-      print_node (file, "chain", TREE_CHAIN (node), indent + 4);
+      if (CODE_CONTAINS_STRUCT (code, TS_COMMON))
+       print_node (file, "chain", TREE_CHAIN (node), indent + 4);
       break;
 
     case tcc_constant:
@@ -850,11 +853,6 @@ print_node (FILE *file, const char *prefix, tree node, int indent)
              }
            fputc ('\"', file);
          }
-         /* Print the chain at second level.  */
-         if (indent == 4)
-           print_node (file, "chain", TREE_CHAIN (node), indent + 4);
-         else
-           print_node_brief (file, "chain", TREE_CHAIN (node), indent + 4);
          break;
 
        case IDENTIFIER_NODE:
@@ -913,7 +911,6 @@ print_node (FILE *file, const char *prefix, tree node, int indent)
                print_node (file, "stmt", tsi_stmt (i), indent + 4);
              }
          }
-         print_node (file, "chain", TREE_CHAIN (node), indent + 4);
          break;
 
        case BLOCK:
@@ -1009,7 +1006,7 @@ print_vec_tree (FILE *file, const char *prefix, VEC(tree,gc) *vec, int indent)
   fprintf (file, "%s <VEC", prefix);
   dump_addr (file, " ", vec);
 
-  for (ix = 0; VEC_iterate (tree, vec, ix, elt); ++ix)
+  FOR_EACH_VEC_ELT (tree, vec, ix, elt)
     {
       char temp[10];
       sprintf (temp, "elt %d", ix);