Commit 7ed979b9 by Daniel Kraft Committed by Daniel Kraft

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
parent 11af16ef
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).
2010-06-27 Thomas Koenig <tkoenig@gcc.gnu.org> 2010-06-27 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/44678 PR fortran/44678
......
...@@ -796,6 +796,15 @@ show_symbol (gfc_symbol *sym) ...@@ -796,6 +796,15 @@ show_symbol (gfc_symbol *sym)
fprintf (dumpfile, "symbol %s ", sym->name); fprintf (dumpfile, "symbol %s ", sym->name);
show_typespec (&sym->ts); 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); show_attr (&sym->attr);
if (sym->value) if (sym->value)
...@@ -1378,13 +1387,20 @@ show_code_node (int level, gfc_code *c) ...@@ -1378,13 +1387,20 @@ show_code_node (int level, gfc_code *c)
break; break;
case EXEC_BLOCK: case EXEC_BLOCK:
show_indent (); {
fputs ("BLOCK ", dumpfile); const char* blocktype;
ns = c->ext.block.ns; if (c->ext.block.assoc)
show_namespace (ns); blocktype = "ASSOCIATE";
show_indent (); else
fputs ("END BLOCK ", dumpfile); blocktype = "BLOCK";
break; 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: case EXEC_SELECT:
d = c->block; d = c->block;
...@@ -2156,7 +2172,7 @@ show_namespace (gfc_namespace *ns) ...@@ -2156,7 +2172,7 @@ show_namespace (gfc_namespace *ns)
fputc ('\n', dumpfile); fputc ('\n', dumpfile);
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) for (ns = ns->contained; ns; ns = ns->sibling)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment