@@ -1032,6 +1032,7 @@ function_and_variable_visibility (bool w
== DECL_COMDAT_GROUP (decl_node->decl));
gcc_checking_assert (node->same_comdat_group);
}
+ node->forced_by_abi = decl_node->forced_by_abi;
if (DECL_EXTERNAL (decl_node->decl))
DECL_EXTERNAL (node->decl) = 1;
}
@@ -0,0 +1,23 @@
+// PR lto/60567
+// { dg-lto-do link }
+// { dg-lto-options { { -flto -fno-use-linker-plugin } } }
+// { dg-extra-ld-options "-r -nostdlib" }
+
+#pragma implementation
+struct S {};
+
+#pragma interface
+struct T
+{
+ virtual void foo (const S &) = 0;
+};
+
+struct U
+{
+ virtual void bar (const S &) = 0;
+};
+
+struct V : public T, public U
+{
+ virtual void bar (const S &) {}
+};