From 03cf98376663dd12764cd0b67e8db2ad1dbaccc1 Mon Sep 17 00:00:00 2001 From: Thomas Koenig Date: Sat, 30 Apr 2011 21:13:44 +0000 Subject: [PATCH] dump-prase-tree.c (show_code_node): Set the current namespace to the BLOCK before displaying it; restore afterwards. 2011-04-30 Thomas Koenig * dump-prase-tree.c (show_code_node): Set the current namespace to the BLOCK before displaying it; restore afterwards. From-SVN: r173223 --- gcc/fortran/ChangeLog | 6 ++++++ gcc/fortran/dump-parse-tree.c | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 66f744aebce..59a4d35d26f 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,9 @@ +2011-04-30 Thomas Koenig + + * dump-prase-tree.c (show_code_node): Set the current + namespace to the BLOCK before displaying it; restore + afterwards. + 2011-04-30 Tobias Burnus PR fortran/48821 diff --git a/gcc/fortran/dump-parse-tree.c b/gcc/fortran/dump-parse-tree.c index 424feb1e68e..c6be074b21d 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 (); -- 2.30.2