This is a fallout of 2008-08-19 Rafael Espíndola <espindola@google.com> * varasm.c (weak_decls): Move earlier in the file. (assemble_external): Add weak decls to the weak_decls list. (declare_weak): Don't add decls to the weak_decls list. eric@atlantis:~/build/gcc/native32> cat t.c extern int i __attribute__((weak)); void foo(void) { int a = i + i + i + i; } eric@atlantis:~/build/gcc/native32> cat t.s .file "t.c" .text .globl foo .type foo, @function foo: pushl %ebp movl %esp, %ebp subl $16, %esp movl i, %edx movl i, %eax addl %eax, %edx movl i, %eax addl %eax, %edx movl i, %eax leal (%edx,%eax), %eax movl %eax, -4(%ebp) leave ret .size foo, .-foo .weak i .weak i .weak i .weak i .ident "GCC: (GNU) 4.4.0 20081122 (experimental) [trunk revision 142117]" .section .note.GNU-stack,"",@progbits
Confirmed.
Setting to P5, please restore to P3 if the assembler for some primary or secondary target complains about the multiple directives or incorrectly assembles the file because of them.
Subject: Bug 38237 Author: sje Date: Mon Mar 30 16:43:40 2009 New Revision: 145303 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=145303 Log: PR middle-end/38237 * tree.h (tree_find_value): New declaration. * tree.c (tree_find_value): New function. * varasm.c (assemble_external): Avoid duplicate entries on lists. Modified: trunk/gcc/ChangeLog trunk/gcc/tree.c trunk/gcc/tree.h trunk/gcc/varasm.c
Closing out as fixed in 4.5. It is probably not worth backporting to 4.4 since it doesn't cause any failures that we know of.