This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Lazy DECL_RTL breakage for weak alias
- To: Mark Mitchell <mark at codesourcery dot com>
- Subject: Re: Lazy DECL_RTL breakage for weak alias
- From: Jim Wilson <wilson at cygnus dot com>
- Date: Fri, 16 Mar 2001 11:57:19 -0800
- cc: gcc-patches at gcc dot gnu dot org
>It's also unclear to me why DECL_EXTERNAL should be cleared.
It is unclear to me also. It appears to have been part of Jason Merrill's
original patch in April 1995 that implemented alias attributes.
It does make a wierd kind of sense though. An alias is defined by this file,
and hence is not an external reference.
Perhaps it has something to do with debug info. dbxout.c will not emit
debug info a VAR_DECL with DECL_EXTERNAL set, on the assumption that the
variable must be defined in some other file, and we will get debug info there.
However, in the case of an alias, this is the file that defines the variable,
so we must emit debug info now. If this is the explanation, then we might
be able to leave the DECL_EXTERNAL value alone by changing the tests in the
debug output files.
Someone more ambitious could try removing the code clearing DECL_EXTERNAL,
building glibc, and running the glibc testsuite. Probably something will
break. If not, try the gdb testsuite.
>In that case, we probably
>want to just set DECL_RTL for the alias explicitly right when we set
>up the alias.
Right, I suggested that in my other mail message. I think assemble_alias
needs to create the DECL_RTL.
Jim