]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR middle-end/53708 (Many failures of the objc tests with -O3 -fnext-runtime and...
authorRichard Guenther <rguenther@suse.de>
Tue, 19 Jun 2012 09:19:07 +0000 (09:19 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Tue, 19 Jun 2012 09:19:07 +0000 (09:19 +0000)
2012-06-19  Richard Guenther  <rguenther@suse.de>

PR tree-optimization/53708
* tree-vect-data-refs.c (vect_can_force_dr_alignment_p): Preserve
user-supplied alignment and alignment of decls with the used
attribute.

From-SVN: r188771

gcc/ChangeLog
gcc/tree-vect-data-refs.c

index 0055ebf90b171937f06bfabca985466f30434e3a..df128a42693d336f4a2203dbe51d4d99866b873c 100644 (file)
@@ -1,3 +1,10 @@
+2012-06-19  Richard Guenther  <rguenther@suse.de>
+
+       PR tree-optimization/53708
+       * tree-vect-data-refs.c (vect_can_force_dr_alignment_p): Preserve
+       user-supplied alignment and alignment of decls with the used
+       attribute.
+
 2012-06-18  Lawrence Crowl  <crowl@google.com>
 
        * timevar.def (TV_PHASE_GENERATE): Rename to TV_PHASE_LATE_ASM.
index 29dff45482be9a923428e0528de6fab4641fae7a..e12fddceb665e9f0517909e5a4be8896daf72d0f 100644 (file)
@@ -4731,6 +4731,12 @@ vect_can_force_dr_alignment_p (const_tree decl, unsigned int alignment)
   if (TREE_ASM_WRITTEN (decl))
     return false;
 
+  /* Do not override explicit alignment set by the user or the alignment
+     as specified by the ABI when the used attribute is set.  */
+  if (DECL_USER_ALIGN (decl)
+      || DECL_PRESERVE_P (decl))
+    return false;
+
   if (TREE_STATIC (decl))
     return (alignment <= MAX_OFILE_ALIGNMENT);
   else