https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85535
--- Comment #9 from Jan Hubicka <hubicka at ucw dot cz> --- The code is intended to avoid specializations that are done only to possibly inline the function. When not optimizing this only happens for always inlines and doing so is just waste of effort. In this case you have method keyed to other compilation unit. I will check what flags we get in this case.