re PR lto/46605 (Segmentation fault in lto_cgraph_replace_node)
authorRichard Guenther <rguenther@suse.de>
Tue, 23 Nov 2010 12:52:16 +0000 (12:52 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Tue, 23 Nov 2010 12:52:16 +0000 (12:52 +0000)
2010-11-23  Richard Guenther  <rguenther@suse.de>

PR lto/46605
* lto.c (read_cgraph_and_symbols): Bail out after errors.

From-SVN: r167074

gcc/lto/ChangeLog
gcc/lto/lto.c

index 8b026724cb391e628778de17dabe63b7c19529da..7ad974011e51499dba5a2283e3c98ae8232348af 100644 (file)
@@ -1,3 +1,8 @@
+2010-11-23  Richard Guenther  <rguenther@suse.de>
+
+       PR lto/46605
+       * lto.c (read_cgraph_and_symbols): Bail out after errors.
+
 2010-11-17  Joseph Myers  <joseph@codesourcery.com>
 
        * lto.c (lto_main): Take no arguments.
index 44f866ad075bce01931230cc177507a0cc2b1f50..5da41b0229459e477fd50e0124bca08e877d83b7 100644 (file)
@@ -2195,6 +2195,11 @@ read_cgraph_and_symbols (unsigned nfiles, const char **fnames)
   /* Merge global decls.  */
   lto_symtab_merge_decls ();
 
+  /* If there were errors during symbol merging bail out, we have no
+     good way to recover here.  */
+  if (seen_error ())
+    fatal_error ("errors during merging of translation units\n");
+
   /* Fixup all decls and types and free the type hash tables.  */
   lto_fixup_decls (all_file_decl_data);
   free_gimple_type_tables ();