PR60147: fix ICE with DECL_NAMELIST and tree-pretty-printer.c
diff mbox

Message ID
State New
Headers show

Commit Message

Richard Biener Feb. 27, 2014, 8:43 a.m. UTC
On Wed, Feb 26, 2014 at 11:19 PM, Tobias Burnus <> 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

also work?  It's odd that we need to do sth special just for namelist-decls.


> 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

diff mbox

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 NAMELIST_DECL:
       dump_decl_name (buffer, node, flags);