https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88130
--- Comment #4 from Jan Hubicka <hubicka at gcc dot gnu.org> --- Created attachment 45282 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=45282&action=edit patch I am testing This seems like ages old isse where at compile time we decide to not ship the vtable constructor (because we do not optimize) and at WPA time we think it may be good idea to stream it. This is done in lto-cgraph and we can't use optimization level there because variables have no optimize attribute and we do not know if there is code that is going to be devirtualized (well, we could probably track this info by tracking all symbols that go into partition but I doubt it is worth the effort) ctor_useable_for_folding is not considering case that the constructor is not in the stream which is fixed here.