OSDN Git Service

* c-pretty-print.c (pp_c_specifier_qualifier_list) [VECTOR_TYPE]:
[pf3gnuchains/gcc-fork.git] / gcc / print-tree.c
index 1d66769..b5656ad 100644 (file)
@@ -32,6 +32,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "tree-iterator.h"
 #include "diagnostic.h"
 #include "tree-flow.h"
+#include "tree-pass.h"
 
 /* Define the hash table of nodes already seen.
    Such nodes are not repeated; brief cross-references are used.  */
@@ -95,10 +96,22 @@ print_node_brief (FILE *file, const char *prefix, const_tree node, int indent)
        fprintf (file, " %s", IDENTIFIER_POINTER (DECL_NAME (node)));
       else if (TREE_CODE (node) == LABEL_DECL
               && LABEL_DECL_UID (node) != -1)
-       fprintf (file, " L.%d", (int) LABEL_DECL_UID (node));
+       {
+         if (dump_flags & TDF_NOUID)
+           fprintf (file, " L.xxxx");
+         else
+           fprintf (file, " L.%d", (int) LABEL_DECL_UID (node));
+       }
       else
-       fprintf (file, " %c.%u", TREE_CODE (node) == CONST_DECL ? 'C' : 'D',
-                DECL_UID (node));
+       {
+         if (dump_flags & TDF_NOUID)
+           fprintf (file, " %c.xxxx",
+                    TREE_CODE (node) == CONST_DECL ? 'C' : 'D');
+         else
+           fprintf (file, " %c.%u",
+                    TREE_CODE (node) == CONST_DECL ? 'C' : 'D',
+                    DECL_UID (node));
+       }
     }
   else if (tclass == tcc_type)
     {
@@ -111,6 +124,8 @@ print_node_brief (FILE *file, const char *prefix, const_tree node, int indent)
            fprintf (file, " %s",
                     IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (node))));
        }
+      if (!ADDR_SPACE_GENERIC_P (TYPE_ADDR_SPACE (node)))
+       fprintf (file, " address-space-%d", TYPE_ADDR_SPACE (node));
     }
   if (TREE_CODE (node) == IDENTIFIER_NODE)
     fprintf (file, " %s", IDENTIFIER_POINTER (node));
@@ -197,7 +212,7 @@ print_node (FILE *file, const char *prefix, tree node, int indent)
 
   if (node == 0)
     return;
-  
+
   code = TREE_CODE (node);
   tclass = TREE_CODE_CLASS (code);
 
@@ -228,7 +243,7 @@ print_node (FILE *file, const char *prefix, tree node, int indent)
   if (table)
     {
       hash = ((unsigned long) node) % HASH_SIZE;
-      
+
       /* If node is in the table, just mention its address.  */
       for (b = table[hash]; b; b = b->next)
        if (b->node == node)
@@ -236,7 +251,7 @@ print_node (FILE *file, const char *prefix, tree node, int indent)
            print_node_brief (file, prefix, node, indent);
            return;
          }
-      
+
       /* Add this node to the table.  */
       b = XNEW (struct bucket);
       b->node = node;
@@ -258,10 +273,20 @@ print_node (FILE *file, const char *prefix, tree node, int indent)
        fprintf (file, " %s", IDENTIFIER_POINTER (DECL_NAME (node)));
       else if (code == LABEL_DECL
               && LABEL_DECL_UID (node) != -1)
-       fprintf (file, " L.%d", (int) LABEL_DECL_UID (node));
+       {
+         if (dump_flags & TDF_NOUID)
+           fprintf (file, " L.xxxx");
+         else
+           fprintf (file, " L.%d", (int) LABEL_DECL_UID (node));
+       }
       else
-       fprintf (file, " %c.%u", code == CONST_DECL ? 'C' : 'D',
-                DECL_UID (node));
+       {
+         if (dump_flags & TDF_NOUID)
+           fprintf (file, " %c.xxxx", code == CONST_DECL ? 'C' : 'D');
+         else
+           fprintf (file, " %c.%u", code == CONST_DECL ? 'C' : 'D',
+                    DECL_UID (node));
+       }
     }
   else if (tclass == tcc_type)
     {
@@ -300,6 +325,9 @@ print_node (FILE *file, const char *prefix, tree node, int indent)
   else if (TYPE_P (node) && TYPE_SIZES_GIMPLIFIED (node))
     fputs (" sizes-gimplified", file);
 
+  if (TYPE_P (node) && !ADDR_SPACE_GENERIC_P (TYPE_ADDR_SPACE (node)))
+    fprintf (file, " address-space-%d", TYPE_ADDR_SPACE (node));
+
   if (TREE_ADDRESSABLE (node))
     fputs (" addressable", file);
   if (TREE_THIS_VOLATILE (node))
@@ -349,7 +377,7 @@ print_node (FILE *file, const char *prefix, tree node, int indent)
          if (DECL_IGNORED_P (node))
            fputs (" ignored", file);
          if (DECL_ABSTRACT (node))
-           fputs (" abstract", file);      
+           fputs (" abstract", file);
          if (DECL_EXTERNAL (node))
            fputs (" external", file);
          if (DECL_NONLOCAL (node))
@@ -381,8 +409,8 @@ print_node (FILE *file, const char *prefix, tree node, int indent)
        fputs (" autoinline", file);
       if (code == FUNCTION_DECL && DECL_BUILT_IN (node))
        fputs (" built-in", file);
-      if (code == FUNCTION_DECL && DECL_NO_STATIC_CHAIN (node))
-       fputs (" no-static-chain", file);
+      if (code == FUNCTION_DECL && DECL_STATIC_CHAIN (node))
+       fputs (" static-chain", file);
 
       if (code == FIELD_DECL && DECL_PACKED (node))
        fputs (" packed", file);
@@ -423,7 +451,7 @@ print_node (FILE *file, const char *prefix, tree node, int indent)
        }
 
       if (CODE_CONTAINS_STRUCT (code, TS_DECL_COMMON))
-       {         
+       {
          if (DECL_VIRTUAL_P (node))
            fputs (" virtual", file);
          if (DECL_PRESERVE_P (node))
@@ -444,7 +472,7 @@ print_node (FILE *file, const char *prefix, tree node, int indent)
            fputs (" decl_6", file);
          if (DECL_LANG_FLAG_7 (node))
            fputs (" decl_7", file);
-         
+
          mode = DECL_MODE (node);
          fprintf (file, " %s", GET_MODE_NAME (mode));
        }
@@ -462,16 +490,16 @@ print_node (FILE *file, const char *prefix, tree node, int indent)
               xloc.column);
 
       if (CODE_CONTAINS_STRUCT (code, TS_DECL_COMMON))
-       {         
+       {
          print_node (file, "size", DECL_SIZE (node), indent + 4);
          print_node (file, "unit size", DECL_SIZE_UNIT (node), indent + 4);
-         
+
          if (code != FUNCTION_DECL || DECL_BUILT_IN (node))
            indent_to (file, indent + 3);
-         
+
          if (DECL_USER_ALIGN (node))
            fprintf (file, " user");
-         
+
          fprintf (file, " align %d", DECL_ALIGN (node));
          if (code == FIELD_DECL)
            fprintf (file, " offset_align " HOST_WIDE_INT_PRINT_UNSIGNED,
@@ -499,7 +527,7 @@ print_node (FILE *file, const char *prefix, tree node, int indent)
 
       print_node_brief (file, "context", DECL_CONTEXT (node), indent + 4);
 
-      if (CODE_CONTAINS_STRUCT (code, TS_DECL_COMMON)) 
+      if (CODE_CONTAINS_STRUCT (code, TS_DECL_COMMON))
        {
          print_node_brief (file, "attributes",
                            DECL_ATTRIBUTES (node), indent + 4);
@@ -541,7 +569,7 @@ print_node (FILE *file, const char *prefix, tree node, int indent)
               && DECL_STRUCT_FUNCTION (node) != 0)
        {
          indent_to (file, indent + 4);
-         dump_addr (file, "saved-insns ", DECL_STRUCT_FUNCTION (node));
+         dump_addr (file, "struct-function ", DECL_STRUCT_FUNCTION (node));
        }
 
       if ((code == VAR_DECL || code == PARM_DECL)
@@ -577,8 +605,9 @@ print_node (FILE *file, const char *prefix, tree node, int indent)
 
       /* The transparent-union flag is used for different things in
         different nodes.  */
-      if (code == UNION_TYPE && TYPE_TRANSPARENT_UNION (node))
-       fputs (" transparent-union", file);
+      if ((code == UNION_TYPE || code == RECORD_TYPE)
+         && TYPE_TRANSPARENT_AGGR (node))
+       fputs (" transparent-aggr", file);
       else if (code == ARRAY_TYPE
               && TYPE_NONALIASED_COMPONENT (node))
        fputs (" nonaliased-component", file);
@@ -622,7 +651,7 @@ print_node (FILE *file, const char *prefix, tree node, int indent)
        fprintf (file, " structural equality");
       else
        dump_addr (file, " canonical type ", TYPE_CANONICAL (node));
-      
+
       print_node (file, "attributes", TYPE_ATTRIBUTES (node), indent + 4);
 
       if (INTEGRAL_TYPE_P (node) || code == REAL_TYPE
@@ -707,7 +736,7 @@ print_node (FILE *file, const char *prefix, tree node, int indent)
          for (i = 0; i < len; i++)
            {
              char temp[10];
-             
+
              sprintf (temp, "arg %d", i);
              print_node (file, temp, TREE_OPERAND (node, i), indent + 4);
            }