From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11694 invoked by alias); 23 Apr 2002 11:04:50 -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 11637 invoked from network); 23 Apr 2002 11:04:43 -0000 Received: from unknown (HELO linuxpc1.lauterbach.com) (213.70.137.66) by sources.redhat.com with SMTP; 23 Apr 2002 11:04:43 -0000 Received: (qmail 1126 invoked by uid 82); 23 Apr 2002 11:04:42 -0000 Received: from Franz.Sirl-kernel@lauterbach.com by linuxpc1.lauterbach.com with qmail-scanner-1.01 (inocmd32: /. . Clean. Processed in 0.60105 secs); 23 Apr 2002 11:04:42 -0000 Received: from frapc1.lauterbach.com (192.149.90.33) by linuxpc1.lauterbach.com with SMTP; 23 Apr 2002 11:04:41 -0000 Message-Id: <5.1.1.2.2.20020423130143.04a21008@mail.lauterbach.com> X-Sender: fsirl-kernel@mail.lauterbach.com Date: Tue, 23 Apr 2002 04:13:00 -0000 To: Alan Modra From: Franz Sirl Subject: Re: GCC 3.1 Prerelease Cc: Mark Mitchell ,gcc@gcc.gnu.org In-Reply-To: <20020423102840.GG31160@bubble.sa.bigpond.net.au> References: <14800000.1019552485@gandalf.codesourcery.com> <14800000.1019552485@gandalf.codesourcery.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-SW-Source: 2002-04/txt/msg01153.txt.bz2 At 12:28 23.04.2002, Alan Modra wrote: >On Tue, Apr 23, 2002 at 02:01:25AM -0700, Mark Mitchell wrote: > > > > Joseph, if you have time to look at PR 6343 (C front end regression > > involving "attribute((weak))"), please do so. I can imagine this > > being a significant problem. > >I've been using this, which at least cures the problem with >__register_frame_info*. Credit for the patch goes to Franz Sirl. Hmm, have you tried recompiling glibc with this patch? I seem to recall glibc using constructs that would produce an error now. Anyway, I'll look into that stuff again later today. Franz. >diff -urpN -xCVS -x'*~' -xTAGS gcc-31.orig/gcc/c-decl.c gcc-31/gcc/c-decl.c >--- gcc-31.orig/gcc/c-decl.c 2002-04-03 09:00:04.000000000 +0930 >+++ gcc-31/gcc/c-decl.c 2002-04-23 18:06:31.000000000 +0930 >@@ -1955,7 +1955,16 @@ duplicate_decls (newdecl, olddecl, diffe > } > > /* Merge the storage class information. */ >- DECL_WEAK (newdecl) |= DECL_WEAK (olddecl); >+ if (DECL_WEAK (newdecl) && !DECL_WEAK (olddecl)) >+ declare_weak (olddecl); >+ if (!DECL_WEAK (newdecl) && DECL_WEAK (olddecl)) >+ declare_weak (newdecl); >+ if (DECL_WEAK (newdecl) && DECL_RTL (newdecl) >+ && GET_CODE (DECL_RTL (newdecl)) == MEM >+ && XEXP (DECL_RTL (newdecl), 0) >+ && GET_CODE (XEXP (DECL_RTL (newdecl), 0)) == SYMBOL_REF) >+ SYMBOL_REF_WEAK (XEXP (DECL_RTL (newdecl), 0)) = 1; >+ > /* For functions, static overrides non-static. */ > if (TREE_CODE (newdecl) == FUNCTION_DECL) > { >diff -urpN -xCVS -x'*~' -xTAGS gcc-31.orig/gcc/cp/decl.c gcc-31/gcc/cp/decl.c >--- gcc-31.orig/gcc/cp/decl.c 2002-04-17 18:56:57.000000000 +0930 >+++ gcc-31/gcc/cp/decl.c 2002-04-23 18:06:31.000000000 +0930 >@@ -3645,7 +3645,15 @@ duplicate_decls (newdecl, olddecl) > } > > /* Merge the storage class information. */ >- DECL_WEAK (newdecl) |= DECL_WEAK (olddecl); >+ if (DECL_WEAK (newdecl) && !DECL_WEAK (olddecl)) >+ declare_weak (olddecl); >+ if (!DECL_WEAK (newdecl) && DECL_WEAK (olddecl)) >+ declare_weak (newdecl); >+ if (DECL_WEAK (newdecl) && DECL_RTL (newdecl) >+ && GET_CODE (DECL_RTL (newdecl)) == MEM >+ && XEXP (DECL_RTL (newdecl), 0) >+ && GET_CODE (XEXP (DECL_RTL (newdecl), 0)) == SYMBOL_REF) >+ SYMBOL_REF_WEAK (XEXP (DECL_RTL (newdecl), 0)) = 1; > DECL_ONE_ONLY (newdecl) |= DECL_ONE_ONLY (olddecl); > DECL_DEFER_OUTPUT (newdecl) |= DECL_DEFER_OUTPUT (olddecl); > TREE_PUBLIC (newdecl) = TREE_PUBLIC (olddecl); > > >-- >Alan Modra >IBM OzLabs - Linux Technology Centre