summaryrefslogtreecommitdiff
path: root/gcc/fortran/dump-parse-tree.c
diff options
context:
space:
mode:
authorThomas Koenig <tkoenig@gcc.gnu.org>2016-02-28 22:24:27 +0000
committerThomas Koenig <tkoenig@gcc.gnu.org>2016-02-28 22:24:27 +0000
commit3070e826ba08f0d2537916ec967cc38dd5c89e1e (patch)
treee0d6a27165e9fdf9ed69ee0bf85e4f52e91e1d90 /gcc/fortran/dump-parse-tree.c
parentb2fd5373948c2d030783e74df4a9b52174ac30fb (diff)
downloadgcc-3070e826ba08f0d2537916ec967cc38dd5c89e1e.tar.gz
dump-parse-tree.c (show_code_node): Print association list of a block if present.
2016-02-28 Thomas Koenig <tkoenig@gcc.gnu.org> * dump-parse-tree.c (show_code_node): Print association list of a block if present. Handle EXEC_END_BLOCK. From-SVN: r233796
Diffstat (limited to 'gcc/fortran/dump-parse-tree.c')
-rw-r--r--gcc/fortran/dump-parse-tree.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/fortran/dump-parse-tree.c b/gcc/fortran/dump-parse-tree.c
index c96133f0e81..8d50d75fcf6 100644
--- a/gcc/fortran/dump-parse-tree.c
+++ b/gcc/fortran/dump-parse-tree.c
@@ -1773,6 +1773,7 @@ show_code_node (int level, gfc_code *c)
{
const char* blocktype;
gfc_namespace *saved_ns;
+ gfc_association_list *alist;
if (c->ext.block.assoc)
blocktype = "ASSOCIATE";
@@ -1780,6 +1781,12 @@ show_code_node (int level, gfc_code *c)
blocktype = "BLOCK";
show_indent ();
fprintf (dumpfile, "%s ", blocktype);
+ for (alist = c->ext.block.assoc; alist; alist = alist->next)
+ {
+ fprintf (dumpfile, " %s = ", alist->name);
+ show_expr (alist->target);
+ }
+
++show_level;
ns = c->ext.block.ns;
saved_ns = gfc_current_ns;
@@ -1793,6 +1800,11 @@ show_code_node (int level, gfc_code *c)
break;
}
+ case EXEC_END_BLOCK:
+ /* Only come here when there is a label on an
+ END ASSOCIATE construct. */
+ break;
+
case EXEC_SELECT:
d = c->block;
fputs ("SELECT CASE ", dumpfile);