aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-vect-data-refs.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2012-11-01 03:48:07 +0100
committerPeter Bergner <bergner@gcc.gnu.org>2012-10-31 21:48:07 -0500
commit79e0221796bf5897204e8077afc20e34f88dab3b (patch)
treee8a046ccfe6058ad71ebb7cc94207dd63b12ae0d /gcc/tree-vect-data-refs.c
parent362261e71f1b1ffdfeb2ceccfd426ccc6317b241 (diff)
downloadgcc-79e0221796bf5897204e8077afc20e34f88dab3b.zip
gcc-79e0221796bf5897204e8077afc20e34f88dab3b.tar.gz
gcc-79e0221796bf5897204e8077afc20e34f88dab3b.tar.bz2
re PR middle-end/53708 (Many failures of the objc tests with -O3 -fnext-runtime and -m32)
2012-10-31 Jakub Jelinek <jakub@redhat.com> PR tree-optimization/53708 * tree-vect-data-refs.c (vect_can_force_dr_alignment_p): Preserve user-supplied alignment when used with an explicit section name. From-SVN: r193058
Diffstat (limited to 'gcc/tree-vect-data-refs.c')
-rw-r--r--gcc/tree-vect-data-refs.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/tree-vect-data-refs.c b/gcc/tree-vect-data-refs.c
index 5866b06..445f2cb 100644
--- a/gcc/tree-vect-data-refs.c
+++ b/gcc/tree-vect-data-refs.c
@@ -4858,6 +4858,13 @@ vect_can_force_dr_alignment_p (const_tree decl, unsigned int alignment)
if (DECL_PRESERVE_P (decl))
return false;
+ /* Do not override explicit alignment set by the user when an explicit
+ section name is also used. This is a common idiom used by many
+ software projects. */
+ if (DECL_SECTION_NAME (decl) != NULL_TREE
+ && !DECL_HAS_IMPLICIT_SECTION_NAME_P (decl))
+ return false;
+
if (TREE_STATIC (decl))
return (alignment <= MAX_OFILE_ALIGNMENT);
else