Commit ebccb65d by Joseph Myers Committed by Joseph Myers

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
parent acb217cb
2005-04-22 Joseph S. Myers <joseph@codesourcery.com>
* varasm.c (do_assemble_alias): Return early if TREE_ASM_WRITTEN
(decl).
2005-04-22 Nathan Sidwell <nathan@codesourcery.com> 2005-04-22 Nathan Sidwell <nathan@codesourcery.com>
* config/i386/i386.md (length_immediate): Use gcc_assert or * config/i386/i386.md (length_immediate): Use gcc_assert or
......
2005-04-22 Joseph S. Myers <joseph@codesourcery.com>
* gcc.dg/weak/weak-13.c: New test.
2005-04-21 Geoffrey Keating <geoffk@apple.com> 2005-04-21 Geoffrey Keating <geoffk@apple.com>
* lib/target-supports.exp (check_effective_target_sync_int_long): * lib/target-supports.exp (check_effective_target_sync_int_long):
......
/* Test for weak aliases with multiple declarations. Sun assembler
rejects multiple weak alias definitions in the output. */
/* { dg-do assemble } */
/* { dg-require-weak "" } */
/* { dg-require-alias "" } */
/* { dg-options "" } */
#pragma weak foo = _foo
extern int foo;
extern int foo;
int _foo = 4;
...@@ -4486,6 +4486,9 @@ find_decl_and_mark_needed (tree decl, tree target) ...@@ -4486,6 +4486,9 @@ find_decl_and_mark_needed (tree decl, tree target)
static void static void
do_assemble_alias (tree decl, tree target ATTRIBUTE_UNUSED) do_assemble_alias (tree decl, tree target ATTRIBUTE_UNUSED)
{ {
if (TREE_ASM_WRITTEN (decl))
return;
TREE_ASM_WRITTEN (decl) = 1; TREE_ASM_WRITTEN (decl) = 1;
TREE_ASM_WRITTEN (DECL_ASSEMBLER_NAME (decl)) = 1; TREE_ASM_WRITTEN (DECL_ASSEMBLER_NAME (decl)) = 1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment