Commit 06e4eab5 by Roger Sayle Committed by Roger Sayle

re PR middle-end/11397 (weak aliases broken on Tru64 UNIX)


	PR middle-end/11397
	* varasm.c (assemble_alias): Remove weak aliases from weak_decls.

	* gcc.dg/special/wkali-2.c: Add dg-require-alias.

From-SVN: r75737
parent dc6798f8
2004-01-12 Roger Sayle <roger@eyesopen.com>
PR middle-end/11397
* varasm.c (assemble_alias): Remove weak aliases from weak_decls.
2004-01-12 Jan Hubicka <jh@suse.cz> 2004-01-12 Jan Hubicka <jh@suse.cz>
PR opt/12826 PR opt/12826
......
2004-01-12 Roger Sayle <roger@eyesopen.com>
PR middle-end/11397
* gcc.dg/special/wkali-2.c: Add dg-require-alias.
2004-01-12 Jan Hubicka <jh@suse.cz> 2004-01-12 Jan Hubicka <jh@suse.cz>
PR opt/12826 PR opt/12826
......
/* { dg-do run } */ /* { dg-do run } */
/* { dg-require-weak "" } */ /* { dg-require-weak "" } */
/* { dg-require-alias "" } */
/* { dg-additional-sources "wkali-2a.c wkali-2b.c" } */ /* { dg-additional-sources "wkali-2a.c wkali-2b.c" } */
#include <stdlib.h> #include <stdlib.h>
......
/* Output variables, constants and external declarations, for GNU compiler. /* Output variables, constants and external declarations, for GNU compiler.
Copyright (C) 1987, 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, Copyright (C) 1987, 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997,
1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
This file is part of GCC. This file is part of GCC.
...@@ -4411,14 +4411,26 @@ assemble_alias (tree decl, tree target ATTRIBUTE_UNUSED) ...@@ -4411,14 +4411,26 @@ assemble_alias (tree decl, tree target ATTRIBUTE_UNUSED)
#endif #endif
#else /* !ASM_OUTPUT_DEF */ #else /* !ASM_OUTPUT_DEF */
#if defined (ASM_OUTPUT_WEAK_ALIAS) || defined (ASM_WEAKEN_DECL) #if defined (ASM_OUTPUT_WEAK_ALIAS) || defined (ASM_WEAKEN_DECL)
if (! DECL_WEAK (decl)) if (DECL_WEAK (decl))
warning ("only weak aliases are supported in this configuration"); {
tree *p, t;
#ifdef ASM_WEAKEN_DECL #ifdef ASM_WEAKEN_DECL
ASM_WEAKEN_DECL (asm_out_file, decl, name, IDENTIFIER_POINTER (target)); ASM_WEAKEN_DECL (asm_out_file, decl, name, IDENTIFIER_POINTER (target));
#else #else
ASM_OUTPUT_WEAK_ALIAS (asm_out_file, name, IDENTIFIER_POINTER (target)); ASM_OUTPUT_WEAK_ALIAS (asm_out_file, name, IDENTIFIER_POINTER (target));
#endif #endif
/* Remove this function from the pending weak list so that
we do not emit multiple .weak directives for it. */
for (p = &weak_decls; (t = *p) ; )
if (DECL_ASSEMBLER_NAME (decl)
== DECL_ASSEMBLER_NAME (TREE_VALUE (t)))
*p = TREE_CHAIN (t);
else
p = &TREE_CHAIN (t);
}
else
warning ("only weak aliases are supported in this configuration");
#else #else
warning ("alias definitions not supported in this configuration; ignored"); warning ("alias definitions not supported in this configuration; ignored");
#endif #endif
......
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