On Thu, Feb 27, 2014 at 11:39 AM, Tobias Burnus
<tobias.bur...@physik.fu-berlin.de> wrote:
> On Thu, Feb 27, 2014 at 10:43:33AM +0100, Richard Biener wrote:
>
>> > hence, one ends up in the code I quote above. That code calls
>> >   print_declaration()
> ...
>> > Hence, TREE_TYPE() is void_type_node and dereferencing that one leads to 
>> > an ICE.
>
> Sorry, I misremembered. In any case, the following leads to an ICE.
>
> print_declaration has the code:
>   if (TREE_CODE (t) != FUNCTION_DECL)
>       if (DECL_INITIAL (t))
> ...
>           dump_generic_node (buffer, DECL_INITIAL (t), spc, flags, false);
> which handles the "CONSTRUCTOR" - which fails with:
>         else if (TREE_CODE (TREE_TYPE (node)) == RECORD_TYPE
> as TREE_TYPE (node) == NULL.
>
>
>> Instead of the goto please duplicate the pp_semicolon and return.
>>
>> Ok with that change.  You probably still want to add the NAMELIST_DECL
>> case to dump_generic_node (to avoid the << Unknown tree: ...).
>
> Fine with me. I assume that that is only relevant for calls to debug_tree()
> in the debugger? Because otherwise, it shouldn't be reachable.

Yes.

> Thanks for the review!
>
> Tobias

Reply via email to