summaryrefslogtreecommitdiff
path: root/gcc/lto/lto.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/lto/lto.c')
-rw-r--r--gcc/lto/lto.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/lto/lto.c b/gcc/lto/lto.c
index 44f866ad075..5da41b02294 100644
--- a/gcc/lto/lto.c
+++ b/gcc/lto/lto.c
@@ -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 ();