This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix COMDAT group of thunks


Jakub Jelinek wrote:

I was actually just putting a breakpoint in the cxx_comdat_group function
looking for decl where
DECL_THUNK_P (decl) && DECL_THUNK_P (THUNK_TARGET (decl))
was true.  I see such thunks in use_thunk, though assuming use_thunk is
first called on the THUNK_TARGET if it is a thunk too (which from my
understanding of emit_associated_thunks is guaranteed), I think everything
that was my assumption too. It turns out to be incorrect, but I will
fix it

_ZTchn8_h8_NK3EQU5cloneEv.  When I added text_section (); call to
use_thunk, I have actually triggered the problem in cxx_comdat_group.
good.

So here is an updated patch to handle this.
I used a while instead of checking twice, because e.g.
TARGET_USE_LOCAL_THUNK_ALIAS_P check ought to be done on both the target
thunk and target of target thunk and it simplifies the code.
makes sense. Thanks for the explanation

Ok to commit for 4.0/HEAD?

2005-02-27 Jakub Jelinek <jakub@redhat.com>

	PR c++/20206
	* decl.c (cxx_comdat_group): Put thunks for
	TARGET_USE_LOCAL_THUNK_ALIAS_P (function) functions into the same
	comdat group as the thunk target.

	* g++.dg/opt/thunk2.C: New test.
	* g++.dg/opt/covariant1.C: New test.
ok thanks.

nathan


-- Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery LLC nathan@codesourcery.com :: http://www.planetfall.pwp.blueyonder.co.uk


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]