https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68860
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Created attachment 37097 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=37097&action=edit gcc6-pr68860-lto.patch I've noticed that the new tests still fail with LTO. It seems the reason is that LTO ignores DECL_HAS_DEBUG_ARGS_P etc., so this stuff is just lost. I've added some changes so that this is streamed, but it seems that is not enough, DECL_ORIGIN of the decls is wrong, so it isn't used anyway. BTW, Honza, why is: if (code == VAR_DECL && DECL_HAS_DEBUG_EXPR_P (t)) visit (DECL_DEBUG_EXPR (t)); used in hash_tree? Depends on what the function is used for, if it is for code generation or something like that, better it should not depend on the debug info stuff...