https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64612
--- Comment #18 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Created attachment 34573 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34573&action=edit gcc5-pr64612.patch Lightly tested patch to do that (tested just on x86_64-linux).