Commit eeeca7d4 by Jason Merrill Committed by Jason Merrill

re PR c++/15882 (Check for return type of overloaded operator new too early)

	PR c++/15882
	* method.c (use_thunk): Check DECL_WEAK as well as
	DECL_ONE_ONLY.

From-SVN: r153909
parent d87f43c3
2009-11-04 Jason Merrill <jason@redhat.com> 2009-11-04 Jason Merrill <jason@redhat.com>
PR c++/15882
* method.c (use_thunk): Check DECL_WEAK as well as
DECL_ONE_ONLY.
PR c++/17365, DR 218 PR c++/17365, DR 218
* name-lookup.c (add_function): Ignore non-functions. * name-lookup.c (add_function): Ignore non-functions.
......
...@@ -378,7 +378,7 @@ use_thunk (tree thunk_fndecl, bool emit_p) ...@@ -378,7 +378,7 @@ use_thunk (tree thunk_fndecl, bool emit_p)
DECL_VISIBILITY (thunk_fndecl) = DECL_VISIBILITY (function); DECL_VISIBILITY (thunk_fndecl) = DECL_VISIBILITY (function);
DECL_VISIBILITY_SPECIFIED (thunk_fndecl) DECL_VISIBILITY_SPECIFIED (thunk_fndecl)
= DECL_VISIBILITY_SPECIFIED (function); = DECL_VISIBILITY_SPECIFIED (function);
if (DECL_ONE_ONLY (function)) if (DECL_ONE_ONLY (function) || DECL_WEAK (function))
make_decl_one_only (thunk_fndecl, cxx_comdat_group (thunk_fndecl)); make_decl_one_only (thunk_fndecl, cxx_comdat_group (thunk_fndecl));
if (flag_syntax_only) if (flag_syntax_only)
......
2009-11-04 Jason Merrill <jason@redhat.com>
PR c++/15882
* g++.dg/abi/thunk5.C: New.
2009-11-04 Andrew Pinski <andrew_pinski@playstation.sony.com> 2009-11-04 Andrew Pinski <andrew_pinski@playstation.sony.com>
PR rtl-opt/41833 PR rtl-opt/41833
......
// PR c++/15882
// 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;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment