This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PR60147: fix ICE with DECL_NAMELIST and tree-pretty-printer.c
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: Tobias Burnus <burnus at net-b dot de>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 27 Feb 2014 09:43:34 +0100
- Subject: Re: PR60147: fix ICE with DECL_NAMELIST and tree-pretty-printer.c
- Authentication-results: sourceware.org; auth=none
- References: <53086730 dot 5090500 at net-b dot de> <530E6857 dot 2060801 at net-b dot de>
On Wed, Feb 26, 2014 at 11:19 PM, Tobias Burnus <burnus@net-b.de> wrote:
> Dear all,
>
> as suggested by Richard, it now only prints the namelist name and no longer
> the variables of the namelist.
>
> Bootstrapped on x86-64-gnu-linux and currently regtesting.
> OK for the trunk when it succeeds?
Works for me, but doesn't the simpler
Index: tree-pretty-print.c
===================================================================
--- tree-pretty-print.c (revision 208066)
+++ tree-pretty-print.c (working copy)
@@ -1390,6 +1390,7 @@
case FIELD_DECL:
case DEBUG_EXPR_DECL:
case NAMESPACE_DECL:
+ case NAMELIST_DECL:
dump_decl_name (buffer, node, flags);
break;
also work? It's odd that we need to do sth special just for namelist-decls.
Richard.
> Tobias
>
>
> On February 22, 2014 10:00, Tobias Burnus wrote:
>>
>> Since GCC 4.9, gfortran generates a DECL_NAMELIST (for DWARF's
>> DW_TAG_namelist) - they are stored in the BIND_EXPR. Namelists are a bit
>> boring: They only group variable names and the namelist name is only used in
>> I/O statements (READ, WRITE) to permit a fancy data input [and output] - and
>> for the debugger.
>>
>> Due to DW_TAG_namelist, namelists are now exposed to the middle end - and
>> I forgot to handle them also in the tree pretty printer - hence
>> -fdump-tree-original now ICEs.
>>
>> For the pretty printer one has two options: Ignoring (or "NYI;") the decl
>> or dumping it. The attached patch does the latter.
>>
>> Bootstrapped (C/C++/Fortran) and regtested on x86-64-gnu-linux.
>> OK for the trunk?
>>
>> Tobias