https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96758
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Created attachment 49109 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49109&action=edit gcc11-pr96758.patch Untested fix. cmpsiz has been computed incorrectly and while the code had the intent to handle the case where both strings have known constant string length, that case actually wasn't handled. That part IMHO shouldn't be backported.