public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Doug Kwan (關振德)" <dougkwan@google.com>
To: "Richard Guenther" <richard.guenther@gmail.com>
Cc: gcc-patches <gcc-patches@gcc.gnu.org>
Subject: Re: [LTO] free_language_specifics crashes C++ pretty-printer
Date: Thu, 09 Oct 2008 08:27:00 -0000	[thread overview]
Message-ID: <498552560810090124j6e47e909yed19015509ae56db@mail.gmail.com> (raw)
In-Reply-To: <84fc9c000810090120j26f198ccs89b0b26ecfded89a@mail.gmail.com>

The error happens during output of a qualified typename.   Do we store
strings of fully qualified type names

-Doug

2008/10/9 Richard Guenther <richard.guenther@gmail.com>:
> 2008/10/9 Doug Kwan (關振德) <dougkwan@google.com>:
>> Without -quiet, cc1plus prints out declaration of functions inside
>> cgraph_expand_function.
>
> Ah, I see.  I think it would be better to dump the mangled
> name in this case, DECL_ASSEMBLER_NAME.  So maybe
> just add a flag to announce_function whether the mangled
> or unmangled name is to be printed.
>
> Richard.
>
>> -Doug
>>
>> 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.  */
>> void
>> announce_function (tree decl)
>> {
>>  if (!quiet_flag)
>>    {
>>      if (rtl_dump_and_exit)
>>        fprintf (stderr, "%s ", IDENTIFIER_POINTER (DECL_NAME (decl)));
>>      else
>>        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 <richard.guenther@gmail.com>:
>>> On Thu, Oct 9, 2008 at 8:35 AM, Doug Kwan (關振德) <dougkwan@google.com> 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
>>>>
>>>
>>
>

  reply	other threads:[~2008-10-09  8:24 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-09  7:06 Doug Kwan (關振德)
2008-10-09  7:57 ` Richard Guenther
2008-10-09  8:21   ` Doug Kwan (關振德)
2008-10-09  8:24     ` Richard Guenther
2008-10-09  8:27       ` Doug Kwan (關振德) [this message]
2008-10-09  8:32         ` Richard Guenther
2008-10-09  9:38           ` Doug Kwan (關振德)
2008-10-09 13:09             ` Richard Guenther
2008-10-09 13:59               ` Diego Novillo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=498552560810090124j6e47e909yed19015509ae56db@mail.gmail.com \
    --to=dougkwan@google.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=richard.guenther@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).