This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: GCC 3.1 Prerelease
While I was looking at this bug earlier (before I saw that you were working
on it), I made this change. Checking TREE_SYMBOL_REFERENCED makes more
sense than TREE_USED anyway, since it's the symbol we care about.
*** varasm.c.~1~ Wed Apr 24 01:04:56 2002
--- varasm.c Tue Apr 23 15:43:46 2002
*************** weak_finish ()
*** 5022,5028 ****
tree decl = TREE_VALUE (t);
const char *name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl));
! if (! TREE_USED (decl))
continue;
#ifdef ASM_WEAKEN_DECL
--- 5022,5030 ----
tree decl = TREE_VALUE (t);
const char *name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl));
! /* We can't rely on TREE_USED here, as decl might be a discarded
! duplicate. */
! if (! TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)))
continue;
#ifdef ASM_WEAKEN_DECL