summaryrefslogtreecommitdiff
path: root/gcc/fortran/dump-parse-tree.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/fortran/dump-parse-tree.c')
-rw-r--r--gcc/fortran/dump-parse-tree.c32
1 files changed, 30 insertions, 2 deletions
diff --git a/gcc/fortran/dump-parse-tree.c b/gcc/fortran/dump-parse-tree.c
index e90b0941885..1a649106f15 100644
--- a/gcc/fortran/dump-parse-tree.c
+++ b/gcc/fortran/dump-parse-tree.c
@@ -598,6 +598,8 @@ show_attr (symbol_attribute *attr)
fputs (" CODIMENSION", dumpfile);
if (attr->dimension)
fputs (" DIMENSION", dumpfile);
+ if (attr->contiguous)
+ fputs (" CONTIGUOUS", dumpfile);
if (attr->external)
fputs (" EXTERNAL", dumpfile);
if (attr->intrinsic)
@@ -794,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)
@@ -853,7 +864,7 @@ show_symbol (gfc_symbol *sym)
}
}
- if (sym->formal_ns)
+ if (sym->formal_ns && (sym->formal_ns->proc_name != sym))
{
show_indent ();
fputs ("Formal namespace", dumpfile);
@@ -1175,6 +1186,7 @@ show_code_node (int level, gfc_code *c)
gfc_filepos *fp;
gfc_inquire *i;
gfc_dt *dt;
+ gfc_namespace *ns;
code_indent (level, c->here);
@@ -1374,6 +1386,22 @@ show_code_node (int level, gfc_code *c)
fputs ("ENDIF", dumpfile);
break;
+ case EXEC_BLOCK:
+ {
+ 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;
fputs ("SELECT CASE ", dumpfile);
@@ -2144,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)
{