This is the mail archive of the 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]

Re: [LTO] free_language_specifics crashes C++ pretty-printer

Without -quiet, cc1plus prints out declaration of functions inside


in cgraphunit.c ...

static void
cgraph_expand_function (struct cgraph_node *node)
  tree decl = node->decl;

  /* We ought to not compile any inline clones.  */
  gcc_assert (!node->global.inlined_to);

  announce_function (decl);

... in toplev.c

/* Called when the start of a function definition is parsed,
   this function prints on stderr the name of the function.  */
announce_function (tree decl)
  if (!quiet_flag)
      if (rtl_dump_and_exit)
        fprintf (stderr, "%s ", IDENTIFIER_POINTER (DECL_NAME (decl)));
        fprintf (stderr, " %s", lang_hooks.decl_printable_name (decl, 2));
      fflush (stderr);
      pp_needs_newline (global_dc->printer) = true;
      diagnostic_set_last_function (global_dc, (diagnostic_info *) NULL);

2008/10/9 Richard Guenther <>:
> On Thu, Oct 9, 2008 at 8:35 AM, Doug Kwan (w) <> wrote:
>> I am working on a bug where free_language_specifics caused the C++
>> pretty-printer crash because it clears all TYPE_CONTEXT.  I can add a
>> band-aid in dump_typename but that does not look like the right fix to
>> me.  Is there a better solution?
> How do we end up calling the pretty-printer?
> Richard.
>> -Doug

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