summaryrefslogtreecommitdiff
path: root/gcc/varasm.c
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2005-04-22 11:15:09 +0100
committerJoseph Myers <jsm28@gcc.gnu.org>2005-04-22 11:15:09 +0100
commitebccb65d5a5a9dbeffbba9824cd2c4fbfdd684a6 (patch)
tree947d8bb4234906c7a01439784b99167a4a3bc891 /gcc/varasm.c
parentacb217cbc92ae905949af948e30f6f3fa6117956 (diff)
downloadgcc-ebccb65d5a5a9dbeffbba9824cd2c4fbfdd684a6.tar.gz
varasm.c (do_assemble_alias): Return early if TREE_ASM_WRITTEN (decl).
* varasm.c (do_assemble_alias): Return early if TREE_ASM_WRITTEN (decl). testsuite: * gcc.dg/weak/weak-13.c: New test. From-SVN: r98551
Diffstat (limited to 'gcc/varasm.c')
-rw-r--r--gcc/varasm.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/varasm.c b/gcc/varasm.c
index 832b55b1d1f..a3aa44aa0b7 100644
--- a/gcc/varasm.c
+++ b/gcc/varasm.c
@@ -4486,6 +4486,9 @@ find_decl_and_mark_needed (tree decl, tree target)
static void
do_assemble_alias (tree decl, tree target ATTRIBUTE_UNUSED)
{
+ if (TREE_ASM_WRITTEN (decl))
+ return;
+
TREE_ASM_WRITTEN (decl) = 1;
TREE_ASM_WRITTEN (DECL_ASSEMBLER_NAME (decl)) = 1;