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][LTO] (Not) merge incompatible common decls


On Thu, 30 Jul 2009, Diego Novillo wrote:

> On Thu, Jul 30, 2009 at 06:45, Richard Guenther<rguenther@suse.de> wrote:
> 
> > I believe emulating linker behavior is a very good start to tackle
> > all the problems (and if you could paste the C and Fortran source
> > into one CU we would have the miscompile issue in the present state
> > as well ...). ÂWe can try to fixup common and sensible cases
> > case by case afterwards.
> 
> Agreed, thanks for fixing this.
> 
> > I'm not good at LTO testsuite magic - I failed to scan the assembler
> > output for the correct sized .comm decl. ÂIf anyone can give hints
> > there that would be appreciated ;)
> 
> Sorry, not sure what you're referring to here.

I tried to use { dg-final { scan-assember ".comm.*i,8,8" } } but
it kept complaining wherever I put that ;)  I guess the lto
harness needs some TLC ...

> > + Â Â Â while (TREE_CHAIN (decl));
> > + Â Â Â /* If necessary move the largest decl to the front of the
> > + Â Â Â Âchain. Â*/
> 
> Vertical spacing before comment.
> 
> > + Â Â Â if (prev_decl != NULL_TREE)
> > + Â Â Â {
> > + Â Â Â Â decl = TREE_CHAIN (prev_decl);
> > + Â Â Â Â TREE_CHAIN (prev_decl) = TREE_CHAIN (decl);
> > + Â Â Â Â TREE_CHAIN (decl) = VEC_index (tree, lto_global_var_decls, i);
> > + Â Â Â Â VEC_replace (tree, lto_global_var_decls, i, decl);
> > + Â Â Â }
> > + Â Â Â /* Mark everything apart from the first var as written out and
> > + Â Â Â Â Âunlink the chain. Â*/
> 
> Likewise.
> 
> OK with those changes.

Thanks,
Richard.

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