This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH][LTO] (Not) merge incompatible common decls
- From: Diego Novillo <dnovillo at google dot com>
- To: Richard Guenther <rguenther at suse dot de>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Thu, 30 Jul 2009 08:19:18 -0700
- Subject: Re: [PATCH][LTO] (Not) merge incompatible common decls
- References: <alpine.LNX.2.00.0907301537230.16347@zhemvz.fhfr.qr>
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.
> + Â Â Â 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.
Diego.