Index: cgraphunit.c
===================================================================
--- cgraphunit.c	(revision 161774)
+++ cgraphunit.c	(working copy)
@@ -2070,7 +2070,8 @@ cgraph_build_static_cdtor (char which, t
 void
 init_cgraph (void)
 {
-  cgraph_dump_file = dump_begin (TDI_cgraph, NULL);
+  if (!cgraph_dump_file)
+    cgraph_dump_file = dump_begin (TDI_cgraph, NULL);
 }
 
 /* The edges representing the callers of the NEW_VERSION node were
Index: lto/lto.c
===================================================================
--- lto/lto.c	(revision 161774)
+++ lto/lto.c	(working copy)
@@ -1435,6 +1449,7 @@ read_cgraph_and_symbols (unsigned nfiles
   struct cgraph_node *node;
 
   lto_stats.num_input_files = nfiles;
+  init_cgraph ();
 
   timevar_push (TV_IPA_LTO_DECL_IO);
 
@@ -1534,6 +1549,13 @@ read_cgraph_and_symbols (unsigned nfiles
 
   /* Finally merge the cgraph according to the decl merging decisions.  */
   timevar_push (TV_IPA_LTO_CGRAPH_MERGE);
+  if (cgraph_dump_file)
+    {
+      if (cgraph_dump_file)
+	fprintf (cgraph_dump_file, "Before merging:\n");
+      dump_cgraph (cgraph_dump_file);
+      dump_varpool (cgraph_dump_file);
+    }
   lto_symtab_merge_cgraph_nodes ();
   ggc_collect ();
 
