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: wilson at cygnus dot com
- Subject: Re: Lazy DECL_RTL breakage for weak alias
- From: Mark Mitchell <mark at codesourcery dot com>
- Date: Fri, 16 Mar 2001 08:20:42 -0800
- Cc: gcc-patches at gcc dot gnu dot org
- Organization: CodeSourcery, LLC
- References: <200103160652.WAA32556@wilson.cygnus.com>
>>>>> "Jim" == Jim Wilson <wilson@cygnus.com> writes:
Jim> Compile this with -gdwarf-2 and we hit the abort at the start
Jim> of make_decl_rtl. The problem here is that attribute alias
Jim> clears the DECL_EXTERNAL bit, so we end up with a decl with
Jim> none of DECL_EXTERNAL, DECL_REGISTER, or TREE_STATIC set.
Jim> However, it is still not an auto. I think the right fix is
Jim> to add another check for TREE_PUBLIC.
I'll look at it.
One key question is whether or not we *need* RTL for this thing. If
not, we should be using DECL_RTL_IF_SET wherever the RTL is getting
used.
It's also unclear to me why DECL_EXTERNAL should be cleared. With a
weak alias, the linker will still resolve to some other version of the
same symbol if one is provided. So, we don't really want to make any
assumptions about storage, etc.
If we do clear DECL_EXTERNAL, then I think we also need to document
this weird combination of flags in tree.h. In that case, we probably
want to just set DECL_RTL for the alias explicitly right when we set
up the alias.
Thoughts?
--
Mark Mitchell mark@codesourcery.com
CodeSourcery, LLC http://www.codesourcery.com