This is the mail archive of the
mailing list for the GCC project.
Re: pretty-ipa merge part 19: Clonning infrastructure
> > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40079
there is one remaining thunk-3.C failure showing on some targets. It is
interesting problem: there is virtual constructor bar with associated
thunk. We manage to devirutalize only call to bar and render table of
virtual methods unnecesary, as a result we remove function bar itself in
favour of its clone where we propagate some constant.
Problem is that clonning of decl is done via copy_decl and
emit_associated_thunks later called when compiling the clone results in
emitting thunk (that is dead) pointing to the original function
resulting in reference to undefined symbol.
Mark, is there any easy way to prevent C++ from emitting thunks on
clones? If not, I can fix it on callgraph side: simply track what nodes
was constructed as clones and avoid calling emit_associated_thunks hook
on it, but it is somewhat post-symptomatic fix. On the other hand,
whole thunk infrastructure needs rewriting for LTO anyway.
Martin, some time ago I think you run into same problem and mentioned to
me that you had to disable clonning on virtual functions, this should be
probably revisited. In this case clonning makes perfect sense.