aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Koenig <tkoenig@gcc.gnu.org>2017-10-08 12:54:40 +0000
committerThomas Koenig <tkoenig@gcc.gnu.org>2017-10-08 12:54:40 +0000
commitcebb191903d3562d848b70dd51060b05e92435b9 (patch)
tree0f7159ef4f29ebbfbadb7ef5c762d9e1f2f9e620
parent08a9e4e734ed74775a014fbe02699c290fbbd5cc (diff)
downloadgcc-cebb191903d3562d848b70dd51060b05e92435b9.zip
gcc-cebb191903d3562d848b70dd51060b05e92435b9.tar.gz
gcc-cebb191903d3562d848b70dd51060b05e92435b9.tar.bz2
dump_prase_tree (show_symbol): Output list of variables in NAMELIST.
2017-10-08 Thomas Koenig <tkoenig@gcc.gnu.org> * dump_prase_tree (show_symbol): Output list of variables in NAMELIST. (show_code_node): Add new line for ELSE and END DO for DO CONCURRENT. * invoke.texi: Document that the output of -fdump-fortran-original, -fdump-fortran-optimized and -fdump-parse-tree is unsable and may lead to ICEs. From-SVN: r253525
-rw-r--r--gcc/fortran/ChangeLog10
-rw-r--r--gcc/fortran/dump-parse-tree.c14
-rw-r--r--gcc/fortran/invoke.texi22
3 files changed, 38 insertions, 8 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index c9e81aa2..18edd11 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,3 +1,13 @@
+2017-10-08 Thomas Koenig <tkoenig@gcc.gnu.org>
+
+ * dump_prase_tree (show_symbol): Output list of variables in
+ NAMELIST.
+ (show_code_node): Add new line for ELSE and END DO for DO
+ CONCURRENT.
+ * invoke.texi: Document that the output of
+ -fdump-fortran-original, -fdump-fortran-optimized and
+ -fdump-parse-tree is unsable and may lead to ICEs.
+
2017-10-07 Paul Thomas <pault@gcc.gnu.org>
PR fortran/82375
diff --git a/gcc/fortran/dump-parse-tree.c b/gcc/fortran/dump-parse-tree.c
index a0098d7..5193c29 100644
--- a/gcc/fortran/dump-parse-tree.c
+++ b/gcc/fortran/dump-parse-tree.c
@@ -967,8 +967,17 @@ show_symbol (gfc_symbol *sym)
show_indent ();
fputs ("PDT parameters", dumpfile);
show_actual_arglist (sym->param_list);
+ }
+ if (sym->attr.flavor == FL_NAMELIST)
+ {
+ gfc_namelist *nl;
+ show_indent ();
+ fputs ("variables : ", dumpfile);
+ for (nl = sym->namelist; nl; nl = nl->next)
+ fprintf (dumpfile, " %s",nl->sym->name);
}
+
--show_level;
}
@@ -1979,8 +1988,8 @@ show_code_node (int level, gfc_code *c)
d = d->block;
for (; d; d = d->block)
{
+ fputs("\n", dumpfile);
code_indent (level, 0);
-
if (d->expr1 == NULL)
fputs ("ELSE", dumpfile);
else
@@ -2170,9 +2179,12 @@ show_code_node (int level, gfc_code *c)
fputc (',', dumpfile);
}
show_expr (c->expr1);
+ ++show_level;
show_code (level + 1, c->block->next);
+ --show_level;
code_indent (level, c->label1);
+ show_indent ();
fputs ("END DO", dumpfile);
break;
diff --git a/gcc/fortran/invoke.texi b/gcc/fortran/invoke.texi
index 63a1442..8892d50 100644
--- a/gcc/fortran/invoke.texi
+++ b/gcc/fortran/invoke.texi
@@ -1120,20 +1120,28 @@ either your program or the GNU Fortran compiler.
@item -fdump-fortran-original
@opindex @code{fdump-fortran-original}
Output the internal parse tree after translating the source program
-into internal representation. Only really useful for debugging the
-GNU Fortran compiler itself.
+into internal representation. This option is mostly useful for
+debugging the GNU Fortran compiler itself. The output generated by
+this option might change between releases. This option may also
+generate internal compiler errors for features which have only
+recently been added.
@item -fdump-fortran-optimized
@opindex @code{fdump-fortran-optimized}
-Output the parse tree after front-end optimization. Only really
-useful for debugging the GNU Fortran compiler itself.
+Output the parse tree after front-end optimization. Mostly useful for
+debugging the GNU Fortran compiler itself. The output generated by
+this option might change between releases. This option may also
+generate internal compiler errors for features which have only
+recently been added.
@item -fdump-parse-tree
@opindex @code{fdump-parse-tree}
Output the internal parse tree after translating the source program
-into internal representation. Only really useful for debugging the
-GNU Fortran compiler itself. This option is deprecated; use
-@code{-fdump-fortran-original} instead.
+into internal representation. Mostly useful for debugging the GNU
+Fortran compiler itself. The output generated by this option might
+change between releases. This option may also generate internal
+compiler errors for features which have only recently been added. This
+option is deprecated; use @code{-fdump-fortran-original} instead.
@item -ffpe-trap=@var{list}
@opindex @code{ffpe-trap=}@var{list}