https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87906
--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> --- Iff we are sure abstract origin and BLOCK are never in the same SCC we can fixup during stream-in, but it's still somewhat ugly and it feels that we are losing some debug info here (which clone we inlined). diff --git a/gcc/tree-streamer-in.c b/gcc/tree-streamer-in.c index bd98ed0b128..50433bf925c 100644 --- a/gcc/tree-streamer-in.c +++ b/gcc/tree-streamer-in.c @@ -915,6 +915,8 @@ lto_input_ts_block_tree_pointers (struct lto_input_block *ib, BLOCK_SUPERCONTEXT (expr) = stream_read_tree (ib, data_in); BLOCK_ABSTRACT_ORIGIN (expr) = stream_read_tree (ib, data_in); + if (DECL_P (BLOCK_ORIGIN (expr))) + BLOCK_ABSTRACT_ORIGIN (expr) = DECL_ORIGIN (BLOCK_ABSTRACT_ORIGIN (expr)); /* Do not stream BLOCK_NONLOCALIZED_VARS. We cannot handle debug information for early inlined BLOCKs so drop it on the floor instead of ICEing in dwarf2out.c. */ when we'd stream this reference as DIE we would get away. But of course esp. the FUNCTION_DECLs referenced as part of the inline BLOCKs are very hard to get rid of (BLOCKs as abstract origin not so). And this isn't stage1 material anymore I fear.