https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95428
--- Comment #11 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Jason Merrill <ja...@gcc.gnu.org>: https://gcc.gnu.org/g:6b958ee0fd0e1b2a2b22784ffbe531ed74358a22 commit r11-2829-g6b958ee0fd0e1b2a2b22784ffbe531ed74358a22 Author: Jason Merrill <ja...@redhat.com> Date: Fri Aug 21 16:23:03 2020 -0400 c++: Emit as-base 'tor symbols for final class. [PR95428] For PR70462 I stopped emitting the as-base constructor and destructor variants for final classes, because they can never be called. Except that it turns out that clang calls base variants from complete variants, even for classes with virtual bases, and in some cases inlines them such that the calls to the base variant are exposed. So we need to continue to emit the as-base symbols, even though they're unreachable by G++-compiled code. gcc/cp/ChangeLog: PR c++/95428 * optimize.c (populate_clone_array): Revert PR70462 change. (maybe_clone_body): Likewise. gcc/testsuite/ChangeLog: * g++.dg/other/final8.C: Adjust expected output.