http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58978
--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Created attachment 31148 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=31148&action=edit gcc49-pr58978.patch While your patch will work too, I think it is better to fix it differently, the problem is that single_imm_use modifies the use_stmt argument even if it returns false, which I didn't expect.