aboutsummaryrefslogtreecommitdiff
path: root/gcc/symtab.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/symtab.c')
-rw-r--r--gcc/symtab.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/symtab.c b/gcc/symtab.c
index 3833734..88e168b 100644
--- a/gcc/symtab.c
+++ b/gcc/symtab.c
@@ -1924,6 +1924,13 @@ symtab_node::can_increase_alignment_p (void)
if (TREE_ASM_WRITTEN (target->decl))
return false;
+ /* If target is already placed in an anchor, we can not touch its
+ alignment. */
+ if (DECL_RTL_SET_P (target->decl)
+ && MEM_P (DECL_RTL (target->decl))
+ && SYMBOL_REF_HAS_BLOCK_INFO_P (XEXP (DECL_RTL (target->decl), 0)))
+ return false;
+
/* Constant pool entries may be shared. */
if (DECL_IN_CONSTANT_POOL (target->decl))
return false;