https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84011
--- Comment #10 from Jakub Jelinek <jakub at gcc dot gnu.org> --- (In reply to Peter Cordes from comment #9) > gcc already totally misses optimizations here where one string is a suffix > of another. "mii" could just be a pointer to the 3rd byte of "sgmii", but > we instead duplicate all the characters. That's where major savings are > possible for this function. ?? That is the task for the linker SHF_MERGE|SHF_STRINGS handling. Why should gcc duplicate that?