OSDN Git Service

2007-07-06 H.J. Lu <hongjiu.lu@intel.com>
[pf3gnuchains/gcc-fork.git] / gcc / tree-dump.c
index c5a87da..d8f871e 100644 (file)
@@ -166,7 +166,7 @@ void
 dump_pointer (dump_info_p di, const char *field, void *ptr)
 {
   dump_maybe_newline (di);
-  fprintf (di->stream, "%-4s: %-8lx ", field, (long) ptr);
+  fprintf (di->stream, "%-4s: %-8lx ", field, (unsigned long) ptr);
   di->column += 15;
 }
 
@@ -319,6 +319,7 @@ dequeue_and_dump (dump_info_p di)
        case tcc_expression:
        case tcc_reference:
        case tcc_statement:
+       case tcc_vl_exp:
          /* These nodes are handled explicitly below.  */
          break;
 
@@ -607,8 +608,19 @@ dequeue_and_dump (dump_info_p di)
       break;
 
     case CALL_EXPR:
-      dump_child ("fn", TREE_OPERAND (t, 0));
-      dump_child ("args", TREE_OPERAND (t, 1));
+      {
+       int i = 0;
+       tree arg;
+       call_expr_arg_iterator iter;
+       dump_child ("fn", CALL_EXPR_FN (t));
+       FOR_EACH_CALL_EXPR_ARG (arg, iter, t)
+         {
+           char buffer[32];
+           sprintf (buffer, "%u", i);
+           dump_child (buffer, arg);
+           i++;
+         }
+      }
       break;
 
     case CONSTRUCTOR:
@@ -744,7 +756,7 @@ dump_node (tree t, int flags, FILE *stream)
 \f
 
 /* Table of tree dump switches. This must be consistent with the
-   TREE_DUMP_INDEX enumeration in tree.h.  */
+   tree_dump_index enumeration in tree-pass.h.  */
 static struct dump_file_info dump_files[TDI_end] =
 {
   {NULL, NULL, NULL, 0, 0, 0, 0},
@@ -791,7 +803,7 @@ static const struct dump_option_value_info dump_options[] =
   {"stmtaddr", TDF_STMTADDR},
   {"memsyms", TDF_MEMSYMS},
   {"all", ~(TDF_RAW | TDF_SLIM | TDF_LINENO | TDF_TREE | TDF_RTL | TDF_IPA 
-           | TDF_STMTADDR | TDF_GRAPH)},
+           | TDF_STMTADDR | TDF_GRAPH | TDF_DIAGNOSTIC)},
   {NULL, 0}
 };