https://gcc.gnu.org/bugzilla/show_bug.cgi?id=51891
--- Comment #3 from Dimitris Papavasiliou <dpapavas at gmail dot com> --- Created attachment 34329 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34329&action=edit A patch that fixes the issue and provides a suitable testcase.