https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79232
--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Created attachment 40607 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40607&action=edit gcc7-pr79232.patch This patch (totally untested) implements it and fixes the ICE with both the original reduced testcase and the one with the visible side-effects. If that is the way to go, I'll need to add more testcases.