aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/dump-parse-tree.c
diff options
context:
space:
mode:
authorDaniel Kraft <d@domob.eu>2010-06-27 10:40:40 +0200
committerDaniel Kraft <domob@gcc.gnu.org>2010-06-27 10:40:40 +0200
commit7ed979b918d8f34e58463d0118f333c45775169b (patch)
tree9255fb388701633465b6a2d4b7a9c6ca353fcc48 /gcc/fortran/dump-parse-tree.c
parent11af16ef2c168b88f92aefeb41871a9488cbcf65 (diff)
downloadgcc-7ed979b918d8f34e58463d0118f333c45775169b.zip
gcc-7ed979b918d8f34e58463d0118f333c45775169b.tar.gz
gcc-7ed979b918d8f34e58463d0118f333c45775169b.tar.bz2
dump-parse-tree.c (show_symbol): Dump target-expression for associate names.
2010-06-27 Daniel Kraft <d@domob.eu> * dump-parse-tree.c (show_symbol): Dump target-expression for associate names. (show_code_node): Make distinction between BLOCK and ASSOCIATE. (show_namespace): Use show_level for correct indentation of "inner namespaces" (contained procedures or BLOCK). From-SVN: r161460
Diffstat (limited to 'gcc/fortran/dump-parse-tree.c')
-rw-r--r--gcc/fortran/dump-parse-tree.c32
1 files changed, 24 insertions, 8 deletions
diff --git a/gcc/fortran/dump-parse-tree.c b/gcc/fortran/dump-parse-tree.c
index 9dc5070..1a64910 100644
--- a/gcc/fortran/dump-parse-tree.c
+++ b/gcc/fortran/dump-parse-tree.c
@@ -796,6 +796,15 @@ show_symbol (gfc_symbol *sym)
fprintf (dumpfile, "symbol %s ", sym->name);
show_typespec (&sym->ts);
+
+ /* If this symbol is an associate-name, show its target expression. */
+ if (sym->assoc)
+ {
+ fputs (" => ", dumpfile);
+ show_expr (sym->assoc->target);
+ fputs (" ", dumpfile);
+ }
+
show_attr (&sym->attr);
if (sym->value)
@@ -1378,13 +1387,20 @@ show_code_node (int level, gfc_code *c)
break;
case EXEC_BLOCK:
- show_indent ();
- fputs ("BLOCK ", dumpfile);
- ns = c->ext.block.ns;
- show_namespace (ns);
- show_indent ();
- fputs ("END BLOCK ", dumpfile);
- break;
+ {
+ const char* blocktype;
+ if (c->ext.block.assoc)
+ blocktype = "ASSOCIATE";
+ else
+ blocktype = "BLOCK";
+ show_indent ();
+ fprintf (dumpfile, "%s ", blocktype);
+ ns = c->ext.block.ns;
+ show_namespace (ns);
+ show_indent ();
+ fprintf (dumpfile, "END %s ", blocktype);
+ break;
+ }
case EXEC_SELECT:
d = c->block;
@@ -2156,7 +2172,7 @@ show_namespace (gfc_namespace *ns)
fputc ('\n', dumpfile);
fputc ('\n', dumpfile);
- show_code (0, ns->code);
+ show_code (show_level, ns->code);
for (ns = ns->contained; ns; ns = ns->sibling)
{