aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDehao Chen <dehao@google.com>2013-06-09 04:15:10 +0000
committerDehao Chen <dehao@google.com>2013-06-09 04:15:10 +0000
commit1794b7e5bf499eca47164d392f60f1f3037d3305 (patch)
tree7d2724ae53a1cdf0d55b156656fdc1cb5a75eaf1
parente81edf5a88129edaa757b41e4ac16eb8f704815a (diff)
Fixes a bug when two weakref symbols are mapped to a same assembler name.
git-svn-id: https://gcc.gnu.org/svn/gcc/branches/google/gcc-4_7@199866 138bc75d-0d04-0410-961f-82ee72b054a4
-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);