https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103499
--- Comment #7 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Nathan Sidwell <nat...@gcc.gnu.org>: https://gcc.gnu.org/g:14979dd31c887ba5ba573f2cdb0647b37e09641a commit r14-5461-g14979dd31c887ba5ba573f2cdb0647b37e09641a Author: Nathaniel Shead <nathanielosh...@gmail.com> Date: Tue Nov 14 11:26:03 2023 -0500 c++: Stream virtual dtor vtable indices Virtual cloned functions have distinct vtable indices, stream them explicitly. As such, this patch ensures that DECL_VINDEX is properly passed on for cloned functions as well to prevent this from causing issues. PR c++/103499 gcc/cp/ChangeLog: * module.cc (trees_out::decl_node): Write DECL_VINDEX for virtual clones. (trees_in::tree_node): Read DECL_VINDEX for virtual clones. gcc/testsuite/ChangeLog: * g++.dg/modules/pr103499_a.C: New test. * g++.dg/modules/pr103499_b.C: New test. Signed-off-by: Nathaniel Shead <nathanielosh...@gmail.com> Signed-off-by: Nathan Sidwell <nat...@acm.org>