Bootstrap & regtest in progress.

Richard.

2012-08-10  Richard Guenther  <rguent...@suse.de>

        * tree-cfg.c (dump_function_to_file): Make sure to dump
        anonymous SSA names when there are no local decls.

Index: gcc/tree-cfg.c
===================================================================
--- gcc/tree-cfg.c      (revision 190286)
+++ gcc/tree-cfg.c      (working copy)
@@ -6677,21 +6776,22 @@ dump_function_to_file (tree fn, FILE *fi
 
   /* When GIMPLE is lowered, the variables are no longer available in
      BIND_EXPRs, so display them separately.  */
-  if (cfun && cfun->decl == fn && !VEC_empty (tree, cfun->local_decls))
+  if (cfun && cfun->decl == fn)
     {
       unsigned ix;
       ignore_topmost_bind = true;
 
       fprintf (file, "{\n");
-      FOR_EACH_LOCAL_DECL (cfun, ix, var)
-       {
-         print_generic_decl (file, var, flags);
-         if (flags & TDF_VERBOSE)
-           print_node (file, "", var, 4);
-         fprintf (file, "\n");
+      if (!VEC_empty (tree, cfun->local_decls))
+       FOR_EACH_LOCAL_DECL (cfun, ix, var)
+         {
+           print_generic_decl (file, var, flags);
+           if (flags & TDF_VERBOSE)
+             print_node (file, "", var, 4);
+           fprintf (file, "\n");
 
-         any_var = true;
-       }
+           any_var = true;
+         }
       if (gimple_in_ssa_p (cfun))
        for (ix = 1; ix < num_ssa_names; ++ix)
          {
@@ -6703,6 +6803,8 @@ dump_function_to_file (tree fn, FILE *fi
                fprintf (file, " ");
                print_generic_expr (file, name, flags);
                fprintf (file, ";\n");
+
+               any_var = true;
              }
          }
     }

Reply via email to