This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

TRANSLATION_UNIT_DECL breaks bootstrap


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]