This fixes PR50494 by avoiding to increase alignment of decls
that are in the constant pool by the vectorizer.

Bootstrap & regtest pending on powerpc64-linux-gnu, with
the older fix reverted.

Richard.

2013-03-05  Richard Biener  <rguent...@suse.de>

        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.

Index: gcc/tree-vect-data-refs.c
===================================================================
--- gcc/tree-vect-data-refs.c   (revision 196466)
+++ gcc/tree-vect-data-refs.c   (working copy)
@@ -4829,9 +4829,12 @@ vect_can_force_dr_alignment_p (const_tre
   /* 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))

Reply via email to