diff options
author | Thomas Koenig <tkoenig@gcc.gnu.org> | 2011-04-30 21:13:44 +0000 |
---|---|---|
committer | Thomas Koenig <tkoenig@gcc.gnu.org> | 2011-04-30 21:13:44 +0000 |
commit | 03cf98376663dd12764cd0b67e8db2ad1dbaccc1 (patch) | |
tree | 20d42b10c628e4764e8d0bfee93854e0227c3349 /gcc/fortran/dump-parse-tree.c | |
parent | 2c7a09d774a2af28c51224404ba47f5f7c182cea (diff) | |
download | gcc-03cf98376663dd12764cd0b67e8db2ad1dbaccc1.zip gcc-03cf98376663dd12764cd0b67e8db2ad1dbaccc1.tar.gz gcc-03cf98376663dd12764cd0b67e8db2ad1dbaccc1.tar.bz2 |
dump-prase-tree.c (show_code_node): Set the current namespace to the BLOCK before displaying it; restore afterwards.
2011-04-30 Thomas Koenig <tkoenig@gcc.gnu.org>
* dump-prase-tree.c (show_code_node): Set the current
namespace to the BLOCK before displaying it; restore
afterwards.
From-SVN: r173223
Diffstat (limited to 'gcc/fortran/dump-parse-tree.c')
-rw-r--r-- | gcc/fortran/dump-parse-tree.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/fortran/dump-parse-tree.c b/gcc/fortran/dump-parse-tree.c index 424feb1..c6be074 100644 --- a/gcc/fortran/dump-parse-tree.c +++ b/gcc/fortran/dump-parse-tree.c @@ -1440,6 +1440,8 @@ show_code_node (int level, gfc_code *c) case EXEC_BLOCK: { const char* blocktype; + gfc_namespace *saved_ns; + if (c->ext.block.assoc) blocktype = "ASSOCIATE"; else @@ -1448,7 +1450,10 @@ show_code_node (int level, gfc_code *c) fprintf (dumpfile, "%s ", blocktype); ++show_level; ns = c->ext.block.ns; + saved_ns = gfc_current_ns; + gfc_current_ns = ns; gfc_traverse_symtree (ns->sym_root, show_symtree); + gfc_current_ns = saved_ns; show_code (show_level, ns->code); --show_level; show_indent (); |