public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [GOOGLE] Avoid emitting duplicated weakref
@ 2013-06-09  3:30 Dehao Chen
  2013-06-09  3:31 ` Xinliang David Li
  0 siblings, 1 reply; 4+ messages in thread
From: Dehao Chen @ 2013-06-09  3:30 UTC (permalink / raw)
  To: GCC Patches; +Cc: David Li

This patch fixes a bug when two weakref symbols are mapped to a same
assembler name.

Testing on going.

OK for google branches if test is fine?

Thanks,
Dehao

Index: gcc/varasm.c
===================================================================
--- gcc/varasm.c (revision 199844)
+++ gcc/varasm.c (working copy)
@@ -5502,6 +5502,10 @@ do_assemble_alias (tree decl, tree target)
   if (TREE_ASM_WRITTEN (decl))
     return;

+  if (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);

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-06-11  9:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-09  3:30 [GOOGLE] Avoid emitting duplicated weakref Dehao Chen
2013-06-09  3:31 ` Xinliang David Li
2013-06-11  9:09   ` Bernhard Reutner-Fischer
2013-06-11  9:23     ` Jan Hubicka

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).