This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [3.3/3.4] wrong handling of "extern const" variables
On Thu, Aug 21, 2003 at 03:09:36PM -0400, Jason Merrill wrote:
> On Thu, 21 Aug 2003 11:11:42 -0700, Richard Henderson <rth@redhat.com> wrote:
> > On Thu, Aug 21, 2003 at 12:23:45PM -0400, Jason Merrill wrote:
> >> TREE_STATIC has never been set on decls with DECL_EXTERNAL set.
> >
> > Why not? Such a decl *must* be in static storage.
>
> Yes, but traditionally TREE_STATIC has meant "in static storage in the
> current translation unit". I'm used to checking TREE_STATIC ||
> DECL_EXTERNAL in most cases.
Adding a DECL_EXTERNAL check in explow.c/maybe_set_unchanging() would
cause RTX_UNCHANGING_P() to be set as it was before. But I guess that
would render the test useless.
http://gcc.gnu.org/ml/gcc-patches/2002-12/msg00533.html states that this
patch for opt/8364 is only a work-around.
Gunther