https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61158
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |ASSIGNED Last reconfirmed| |2014-05-14 CC| |jakub at gcc dot gnu.org Assignee|unassigned at gcc dot gnu.org |jakub at gcc dot gnu.org Ever confirmed|0 |1 --- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Created attachment 32795 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=32795&action=edit gcc49-pr61158.patch Untested fix. If prec >= shiftc, then the result is always 0, as we shift away all the possibly non-zero bits. Therefore, we should just optimize it into (X, 0).