https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65400
--- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Created attachment 35059 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35059&action=edit gcc5-pr65400.patch Untested fix for the first issue.