aboutsummaryrefslogtreecommitdiff
path: root/gcc/varasm.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/varasm.c')
-rw-r--r--gcc/varasm.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/varasm.c b/gcc/varasm.c
index bffe9ee6e30..fd513d4545f 100644
--- a/gcc/varasm.c
+++ b/gcc/varasm.c
@@ -5502,6 +5502,11 @@ do_assemble_alias (tree decl, tree target)
if (TREE_ASM_WRITTEN (decl))
return;
+ if (L_IPO_COMP_MODE
+ && lookup_attribute ("weakref", DECL_ATTRIBUTES (decl))
+ && TREE_ASM_WRITTEN (DECL_ASSEMBLER_NAME (decl)))
+ return;
+
/* We must force creation of DECL_RTL for debug info generation, even though
we don't use it here. */
make_decl_rtl (decl);