https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67973
--- Comment #16 from Iain Sandoe <iains at gcc dot gnu.org> --- Created attachment 37227 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=37227&action=edit back-port of Rainer's fix. I've been using this on my GCC5.3 WIP (it might be a reasonable starting point, don't know if it'll apply cleanly to 5.3.1)