http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59543
--- Comment #8 from Richard Biener <rguenth at gcc dot gnu.org> --- I think 2) is the issue, so does Index: lto-streamer-in.c =================================================================== --- lto-streamer-in.c (revision 208642) +++ lto-streamer-in.c (working copy) @@ -988,7 +988,7 @@ input_function (tree fn_decl, struct dat We can't remove them earlier because this would cause uid mismatches in fixups, but we can do it at this point, as long as debug stmts don't require fixups. */ - if (!MAY_HAVE_DEBUG_STMTS && is_gimple_debug (stmt)) + if (!MAY_HAVE_DEBUG_STMTS && !flag_wpa && is_gimple_debug (stmt)) { gimple_stmt_iterator gsi = bsi; gsi_next (&bsi); fix it? Not sure why we output the original function again.