https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118063
--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> --- See specifically https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58203#c2 . Basically memset/memcpy should either be marked as used or should never be in LTO because references to them come in late in compiling process.