PR c++/35067
* method.c (use_thunk): Check DECL_WEAK as well as
DECL_ONE_ONLY.
From-SVN: r153913
+2009-11-04 Jason Merrill <jason@redhat.com>
+
+ PR c++/35067
+ * method.c (use_thunk): Check DECL_WEAK as well as
+ DECL_ONE_ONLY.
+
2009-11-04 Dodji Seketeli <dodji@redhat.com>
Revert fix for PR c++/37093
DECL_VISIBILITY (thunk_fndecl) = DECL_VISIBILITY (function);
DECL_VISIBILITY_SPECIFIED (thunk_fndecl)
= DECL_VISIBILITY_SPECIFIED (function);
- if (DECL_ONE_ONLY (function))
+ if (DECL_ONE_ONLY (function) || DECL_WEAK (function))
make_decl_one_only (thunk_fndecl);
if (flag_syntax_only)
+2009-11-04 Jason Merrill <jason@redhat.com>
+
+ PR c++/35067
+ * g++.dg/abi/thunk5.C: New.
+
2009-11-04 Dodji Seketeli <dodji@redhat.com>
Revert fix for PR c++/37093
--- /dev/null
+// PR c++/35067
+// The thunks should be weak even on targets without one-only support.
+// { dg-require-weak "" }
+// { dg-final { scan-assembler "weak.*ZTv" } }
+
+struct A
+{
+ virtual ~A() { }
+};
+
+struct B: virtual A { };
+
+B b;