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?
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
2014-02-26 Tobias Burnus <bur...@net-b.de>
PR middle-end/60147
* tree-pretty-print.c (dump_generic_node): Handle
NAMELIST_DECL.
diff --git a/gcc/tree-pretty-print.c b/gcc/tree-pretty-print.c
index 0595499..0d46a1c 100644
--- a/gcc/tree-pretty-print.c
+++ b/gcc/tree-pretty-print.c
@@ -1720,7 +1720,16 @@ dump_generic_node (pretty_printer *buffer, tree node, int spc, int flags,
for (op0 = BIND_EXPR_VARS (node); op0; op0 = DECL_CHAIN (op0))
{
- print_declaration (buffer, op0, spc+2, flags);
+ if (TREE_CODE(op0) == NAMELIST_DECL)
+ {
+ INDENT (spc+2);
+ pp_string (buffer, "namelist /");
+ dump_decl_name (buffer, op0, flags);
+ pp_string (buffer, "/");
+ pp_semicolon (buffer);
+ }
+ else
+ print_declaration (buffer, op0, spc+2, flags);
pp_newline (buffer);
}
}