https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58517
--- Comment #8 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Created attachment 55237 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55237&action=edit Patch which I think will fix this This is option 1 of comment #3 though with an updated version. I have not tested this at all but I think it will work.