https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64809
--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Created attachment 34590 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34590&action=edit gcc5-pr64809.patch IMHO in any case we should apply something like the attached patch, there is no point to even look at the debug stmts and TER really shouldn't make any guarantees for uses in debug stmts, those must be by definition ignored for TER purposes. Whether that is sufficient is another question.