https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62173
--- Comment #38 from amker at gcc dot gnu.org --- The first patch actually helping this case is at https://gcc.gnu.org/ml/gcc-patches/2015-02/msg00836.html But the real problem lies in scev/ivopt about how type conversion and scev overflow are handled. I am working on this. According to Richard, both the patch and the real fix are stage1 stuff. That's why it has been quite recently.