https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99015
--- Comment #16 from Vladimir Makarov <vmakarov at gcc dot gnu.org> --- I've remembered that the patch for PR112918 triggered a hidden bug on mips. So I added code fixing this bug too to this PR patch. The new patch was successfully bootstrapped and tested on amd64, arm64, and ppc64le.