From 010403d180a49644c9786a55d51d677aafa86402 Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Wed, 6 Mar 2013 08:38:46 +0000 Subject: re PR lto/50494 (gcc.dg/vect/vect-reduc-2char.c fails spuriously on ppc with -flto) 2013-03-06 Richard Biener PR middle-end/50494 * tree-vect-data-refs.c (vect_can_force_dr_alignment_p): Do not adjust alignment of DECL_IN_CONSTANT_POOL decls. Revert 2013-02-13 Richard Biener PR lto/50494 * varasm.c (output_constant_def_1): Get the decl representing the constant as argument. (output_constant_def): Wrap output_constant_def_1. (make_decl_rtl): Use output_constant_def_1 with the decl representing the constant. (build_constant_desc): Optionally re-use a decl already representing the constant. (tree_output_constant_def): Adjust. From-SVN: r196487 --- gcc/tree-vect-data-refs.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'gcc/tree-vect-data-refs.c') diff --git a/gcc/tree-vect-data-refs.c b/gcc/tree-vect-data-refs.c index fe009ac..fdb73c3 100644 --- a/gcc/tree-vect-data-refs.c +++ b/gcc/tree-vect-data-refs.c @@ -4829,9 +4829,12 @@ vect_can_force_dr_alignment_p (const_tree decl, unsigned int alignment) /* We cannot change alignment of common or external symbols as another translation unit may contain a definition with lower alignment. The rules of common symbol linking mean that the definition - will override the common symbol. */ + will override the common symbol. The same is true for constant + pool entries which may be shared and are not properly merged + by LTO. */ if (DECL_EXTERNAL (decl) - || DECL_COMMON (decl)) + || DECL_COMMON (decl) + || DECL_IN_CONSTANT_POOL (decl)) return false; if (TREE_ASM_WRITTEN (decl)) -- cgit v1.1