https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66432
--- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Created attachment 36785 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36785&action=edit gcc6-pr66432.patch Untested fix. We actually rely on decl_debug_args being the DECL_ORIGIN, not something similar to it, so your second patch will not work.