https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61691
Jonathan Wakely <redi at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |INVALID --- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> --- This is the correct behaviour, the code needs to be fixed. See Bug 61659 comment 14 for the reason GCC started diagnosing this (the virtual destructor must be output so it's available for LTO and that destructor releases the reference on the smart pointer and so requires the pointed-to type to be complete)