From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10525 invoked by alias); 24 Apr 2002 17:32:08 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 10428 invoked from network); 24 Apr 2002 17:31:55 -0000 Received: from unknown (HELO executor.cambridge.redhat.com) (195.224.55.237) by sources.redhat.com with SMTP; 24 Apr 2002 17:31:55 -0000 Received: from prospero.cambridge.redhat.com (dell-paw-2.cambridge.redhat.com [195.224.55.226]) by executor.cambridge.redhat.com (Postfix) with ESMTP id 65402ABAF8; Wed, 24 Apr 2002 18:31:54 +0100 (BST) Received: by prospero.cambridge.redhat.com (Postfix, from userid 4046) id D79B8F7B7A; Wed, 24 Apr 2002 18:31:49 +0100 (BST) To: Franz Sirl Cc: Richard Henderson , Alan Modra , Mark Mitchell , gcc@gcc.gnu.org Subject: Re: GCC 3.1 Prerelease References: <5.1.1.2.2.20020423130143.04a21008@mail.lauterbach.com> <5.1.1.2.2.20020423190859.04dc6b88@mail.lauterbach.com> <20020423110433.A728@redhat.com> <200204240003.42142@enzo.bigblue.local> From: Jason Merrill In-Reply-To: <200204240003.42142@enzo.bigblue.local> (Franz Sirl's message of "Wed, 24 Apr 2002 00:03:42 +0200") Date: Wed, 24 Apr 2002 10:56:00 -0000 Message-ID: User-Agent: Gnus/5.090004 (Oort Gnus v0.04) Emacs/21.1 (i686-pc-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-SW-Source: 2002-04/txt/msg01253.txt.bz2 --=-=-= Content-length: 215 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. --=-=-= Content-Type: text/x-patch Content-Disposition: inline Content-length: 652 *** 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 --=-=-=--