This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PR lto/84105] handle TYPE_IDENTIFIERs for FUNCTION_TYPEs in the gimple pretty printer
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: Aldy Hernandez <aldyh at redhat dot com>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 31 Jan 2018 11:32:59 +0100
- Subject: Re: [PR lto/84105] handle TYPE_IDENTIFIERs for FUNCTION_TYPEs in the gimple pretty printer
- Authentication-results: sourceware.org; auth=none
- References: <f7b31d48-1514-72d5-c70b-584ff121f81c@redhat.com>
On Tue, Jan 30, 2018 at 7:29 PM, Aldy Hernandez <aldyh@redhat.com> wrote:
> Hi!
>
> As discussed in the PR, the ICE here happens in dump_generic_node:
>
> case FUNCTION_TYPE:
> case METHOD_TYPE:
> ...
> if (TYPE_NAME (node) && DECL_NAME (TYPE_NAME (node)))
> dump_decl_name (pp, TYPE_NAME (node), flags);
>
> (gdb) print node
> $21 = <function_type 0x7fffef652dc8 printfn_t>
> (gdb) print node.type_common.name
> $22 = <identifier_node 0x7fffef654730 printfn_t>
>
> TYPE_NAME is an IDENTIFIER_NODE, whereas we're expecting a DECL_P, and bad
> things happen.
>
> OK pending tests?
OK.