Commit 03cf9837 by Thomas Koenig

dump-prase-tree.c (show_code_node): Set the current namespace to the BLOCK…

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
parent 2c7a09d7
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.
2011-04-30 Tobias Burnus <burnus@net-b.de>
PR fortran/48821
......
......@@ -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 ();
......
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