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/lto-function-out.c b/gcc/lto-function-out.c index 90dedad..17621f2 100644 --- a/gcc/lto-function-out.c +++ b/gcc/lto-function-out.c @@ -2379,6 +2379,9 @@ lto_output (cgraph_node_set set) struct lto_out_decl_state *decl_state; cgraph_node_set_iterator csi; + /* Remove bodies of extern inline functions we never inlined. */ + cgraph_remove_unreachable_nodes (false, dump_file); + bitmap_obstack_initialize (NULL); lto_static_init_local ();