From: Alan Modra <amodra@bigpond.net.au>
To: Mark Mitchell <mark@codesourcery.com>
Cc: gcc@gcc.gnu.org
Subject: Re: GCC 3.1 Prerelease
Date: Tue, 23 Apr 2002 03:53:00 -0000 [thread overview]
Message-ID: <20020423102840.GG31160@bubble.sa.bigpond.net.au> (raw)
In-Reply-To: <14800000.1019552485@gandalf.codesourcery.com>
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.
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
next prev parent reply other threads:[~2002-04-23 10:28 UTC|newest]
Thread overview: 100+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-04-23 2:12 Mark Mitchell
2002-04-23 3:53 ` Alan Modra [this message]
2002-04-23 4:13 ` Franz Sirl
2002-04-23 4:32 ` Alan Modra
2002-04-23 10:40 ` Franz Sirl
2002-04-23 11:42 ` Richard Henderson
2002-04-23 15:08 ` Franz Sirl
2002-04-23 15:10 ` Richard Henderson
2002-04-24 10:56 ` Jason Merrill
2002-04-24 12:04 ` Franz Sirl
2002-04-24 13:03 ` Richard Henderson
2002-04-24 13:14 ` Jason Merrill
2002-04-25 12:57 ` [PATCH] Fix PR c/6343 (was: Re: GCC 3.1 Prerelease) Franz Sirl
2002-04-25 12:59 ` Jason Merrill
2002-04-28 8:44 ` Franz Sirl
2002-04-28 11:59 ` Mark Mitchell
2002-04-28 15:00 ` Jason Merrill
2002-04-28 16:36 ` Mark Mitchell
2002-04-29 11:36 ` Franz Sirl
2002-04-30 6:20 ` Jason Merrill
2002-04-30 9:40 ` Mark Mitchell
2002-04-23 12:22 ` GCC 3.1 Prerelease Jason Merrill
2002-04-23 9:08 ` Per Bothner
2002-04-23 9:30 ` Mark Mitchell
2002-04-23 10:12 ` Per Bothner
2002-04-23 13:25 ` Mark Mitchell
2002-04-23 14:52 ` Tom Tromey
2002-04-23 15:02 ` Per Bothner
2002-04-23 16:11 ` Tom Tromey
2002-04-24 10:14 ` Alexandre Petit-Bianco
2002-04-24 10:30 ` Tom Tromey
2002-04-24 10:32 ` Mark Mitchell
2002-04-23 13:19 ` Richard Henderson
2002-04-23 13:28 ` Mark Mitchell
2002-04-23 13:35 ` Richard Henderson
2002-04-23 13:50 ` Mark Mitchell
2002-04-23 13:52 ` Richard Henderson
2002-04-23 16:30 ` mips n64 eh failures Richard Henderson
2002-04-23 16:53 ` Mark Mitchell
2002-04-23 16:59 ` Richard Henderson
2002-04-23 18:00 ` Richard Henderson
2002-04-23 18:20 ` Richard Henderson
2002-04-23 19:35 ` Richard Henderson
2002-04-24 9:08 ` Mark Mitchell
-- strict thread matches above, loose matches on Subject: below --
2002-04-23 14:56 GCC 3.1 Prerelease Tom Tromey
2002-04-23 13:38 GCC 3.1 prerelease Mark Mitchell
2002-04-23 18:37 ` Kurt Wall
2002-04-23 19:23 ` Phil Edwards
2002-04-24 9:49 ` Mark Mitchell
2002-04-24 11:03 ` Joseph S. Myers
2002-04-24 19:03 ` Kurt Wall
2002-04-23 10:46 GCC 3.1 Prerelease Paolo Carlini
2002-04-22 20:00 Billinghurst, David (CRTS)
2002-04-22 4:07 Wolfgang Bangerth
2002-04-22 0:07 Toon Moene
2002-04-20 20:09 John David Anglin
2002-04-20 21:44 ` Mark Mitchell
2002-04-23 12:19 ` John David Anglin
2002-04-21 7:06 ` Toon Moene
2002-04-21 12:57 ` Mark Mitchell
2002-04-21 13:50 ` Franz Sirl
2002-04-22 3:20 ` Gerald Pfeifer
2002-04-22 10:50 ` Franz Sirl
2002-04-22 10:56 ` Mark Mitchell
2002-04-21 20:54 ` John David Anglin
2002-04-22 0:13 ` Richard Henderson
2002-04-22 7:48 ` Mark Mitchell
[not found] <FAC87D7C874EAB46A847604DA4FD5A640346FC@crtsmail.corp.riotinto.o rg>
2002-04-20 20:05 ` Billinghurst, David (CRTS)
2002-04-20 20:16 ` Mark Mitchell
[not found] <Pine.LNX.4.30.0204210235010.13395-100000@snake.iap.physik.tu-da rmstadt.de>
2002-04-20 17:16 ` Peter Schmid
2002-04-20 17:57 ` Mark Mitchell
2002-04-21 14:16 ` Richard Henderson
2002-04-21 16:54 ` Mark Mitchell
2002-04-23 5:46 ` Jason Merrill
2002-04-23 9:12 ` Mark Mitchell
2002-04-20 13:08 Mark Mitchell
2002-04-20 13:51 ` Stan Shebs
2002-04-20 14:07 ` Mark Mitchell
2002-04-20 16:10 ` Joel Sherrill
2002-04-20 13:56 ` Joseph S. Myers
2002-04-20 13:59 ` Mark Mitchell
2002-04-20 14:36 ` Jakub Jelinek
2002-04-20 17:17 ` Mark Mitchell
2002-04-23 9:49 ` Jakub Jelinek
2002-04-24 10:07 ` Mark Mitchell
2002-04-20 16:35 ` Tom Tromey
2002-04-20 17:28 ` Mark Mitchell
2002-04-20 19:04 ` David S. Miller
2002-04-20 20:08 ` Mark Mitchell
2002-04-20 20:13 ` David S. Miller
2002-04-20 20:18 ` Per Bothner
2002-04-21 11:27 ` Tom Tromey
2002-04-20 20:45 ` Mark Mitchell
2002-04-20 22:09 ` Alan Modra
2002-04-21 3:47 ` Gerald Pfeifer
2002-04-23 8:24 ` Gerald Pfeifer
2002-04-23 9:13 ` Mark Mitchell
2002-04-23 9:36 ` Joe Buck
2002-04-23 14:21 ` Gerald Pfeifer
2002-04-21 8:16 ` Andreas Schwab
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20020423102840.GG31160@bubble.sa.bigpond.net.au \
--to=amodra@bigpond.net.au \
--cc=gcc@gcc.gnu.org \
--cc=mark@codesourcery.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).