This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
TRANSLATION_UNIT_DECL breaks bootstrap
- From: Mark Mitchell <mark at codesourcery dot com>
- To: geoffk at apple dot com
- Cc: gcc at gcc dot gnu dot org
- Date: Fri, 11 Jul 2003 14:14:30 -0700
- Subject: TRANSLATION_UNIT_DECL breaks bootstrap
- Reply-to: mark at codesourcery dot com
Geoff --
Your patch breaks i686-pc-linux-gnu.
The problem is that there is code that expects that file-scope
variables have NULL DECL_CONTEXT, and that is no longer true.
The proximate failure is in make_decl_rtl:
int top_level = (DECL_CONTEXT (decl) == NULL_TREE);
However, it looks like there are other places where that assumption is
being made as well:
For example, integrate.c does:
/* Set the context for the new declaration. */
if (!DECL_CONTEXT (decl))
/* Globals stay global. */
;
and dwarfout.c does:
if (! DECL_CONTEXT (decl))
{
if (pending_types != 0)
abort ();
}
Presumably, these kinds of things all need to change.
I will fix the make_decl_rtl problem to see if that allows me to make
progress.
--
Mark Mitchell
CodeSourcery, LLC
mark@codesourcery.com