aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-vect-data-refs.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree-vect-data-refs.c')
-rw-r--r--gcc/tree-vect-data-refs.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/gcc/tree-vect-data-refs.c b/gcc/tree-vect-data-refs.c
index ff02ff3..1d40055 100644
--- a/gcc/tree-vect-data-refs.c
+++ b/gcc/tree-vect-data-refs.c
@@ -5317,7 +5317,13 @@ vect_can_force_dr_alignment_p (const_tree decl, unsigned int alignment)
if (TREE_CODE (decl) != VAR_DECL)
return false;
- gcc_assert (!TREE_ASM_WRITTEN (decl));
+ /* With -fno-toplevel-reorder we may have already output the constant. */
+ if (TREE_ASM_WRITTEN (decl))
+ return false;
+
+ /* Constant pool entries may be shared and not properly merged by LTO. */
+ if (DECL_IN_CONSTANT_POOL (decl))
+ return false;
if (TREE_PUBLIC (decl) || DECL_EXTERNAL (decl))
{