https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115337
--- Comment #12 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Should be fixed now. I think we want to backport the fold-const.cc first patch to older branches too, but it will be different there.