diff --git a/gcc/lto-cgraph.c b/gcc/lto-cgraph.c index 12fad49..5ebdd50 100644 --- a/gcc/lto-cgraph.c +++ b/gcc/lto-cgraph.c @@ -167,6 +167,8 @@ output_edge (struct lto_simple_output_block *ob, intptr_t ref; unsigned HOST_WIDEST_INT flags = 0; + gcc_assert (!DECL_EXTERNAL (edge->caller->decl)); + lto_output_uleb128_stream (ob->main_stream, LTO_cgraph_edge); LTO_DEBUG_INDENT (LTO_cgraph_edge); diff --git a/gcc/passes.c b/gcc/passes.c index a39c7ab..aa440f7 100644 --- a/gcc/passes.c +++ b/gcc/passes.c @@ -1383,7 +1383,10 @@ ipa_write_summaries (void) { cgraph_node_set set; struct cgraph_node *node; - + + /* Remove bodies of extern inline functions we never inlined. */ + cgraph_remove_unreachable_nodes (false, dump_file); + if (flag_generate_lto && !(errorcount || sorrycount)) { lto_new_static_inline_states ();