mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-09 21:31:30 +08:00
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
This commit is contained in:
parent
acb217cbc9
commit
ebccb65d5a
@ -1,3 +1,8 @@
|
||||
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>
|
||||
|
||||
* config/i386/i386.md (length_immediate): Use gcc_assert or
|
||||
|
@ -1,3 +1,7 @@
|
||||
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>
|
||||
|
||||
* lib/target-supports.exp (check_effective_target_sync_int_long):
|
||||
|
13
gcc/testsuite/gcc.dg/weak/weak-13.c
Normal file
13
gcc/testsuite/gcc.dg/weak/weak-13.c
Normal file
@ -0,0 +1,13 @@
|
||||
/* 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)
|
||||
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;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user