https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120837
--- Comment #17 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Created attachment 61792 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=61792&action=edit gcc16-pr120837.patch Untested patch which instead of dropping the optimization simply performs everything in sizetype type before final POINTER_PLUS. It isn't recursive admittedly.