[Bug lto/50494] gcc.dg/vect/vect-reduc-2char.c fails spuriously on ppc with -flto

ebotcazou at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Mar 5 14:39:00 GMT 2013


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50494

--- Comment #30 from Eric Botcazou <ebotcazou at gcc dot gnu.org> 2013-03-05 14:39:00 UTC ---
> So we can revert the part of the patch that ends up not creating
> a new decl but only transfer DECL_ALIGN.  But then we still don't
> "merge" the decls we use to refer to the constants, so I wonder
> how creating less decls can fix this issue at all ...

That would be worse, DECL_ALIGN should _not_ be fiddled with for constant pool
entries in the first place since the constant/DECL_INITIAL is shared.

> Note that merging constants but not decls also can end up
> creating bogusly aligned constants.  In fact it seems to me
> that we need to arrange for the LTO path
> 
>   /* If this variable belongs to the global constant pool, retrieve the
>      pre-computed RTL or recompute it in LTO mode.  */
>   if (TREE_CODE (decl) == VAR_DECL && DECL_IN_CONSTANT_POOL (decl))
>     {
>       SET_DECL_RTL (decl, output_constant_def_1 (DECL_INITIAL (decl),
>                                                  decl, 1));
>       return;
>     }
> 
> to never share a constant pool entry ... :/

We should simply not touch DECL_IN_CONSTANT_POOL variables, since they are not
regular VAR_DECLs but only represent the underlying constant.



More information about the Gcc-bugs mailing list