From patchwork Sat Jun 26 22:12:51 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [fortran] PR 44678, BLOCK and SELECT TYPE with -fdump-parse-tree Date: Sat, 26 Jun 2010 12:12:51 -0000 From: Thomas Koenig X-Patchwork-Id: 57076 Message-Id: <1277590371.6952.10.camel@linux-fd1f.site> To: fortran@gcc.gnu.org Cc: gcc-patches@gcc.gnu.org Hello world, the attached patch fixes a problem with -fdump-parse-tree, where BLOCKs and SELECT TYPE lead to an ICE. Currently regtesting; I don't expect any regressions because the testsite does not use -fdump-parse-tree (maybe it should...) OK for trunk if regtesting passes? Thomas 2010-06-27 Thomas Koenig PR fortran/44678 * dump-parse-tree.c (show_code_node): Show namespace for EXEC_BLOCK. Index: dump-parse-tree.c =================================================================== --- dump-parse-tree.c (Revision 161427) +++ dump-parse-tree.c (Arbeitskopie) @@ -1177,6 +1177,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); @@ -1376,6 +1377,15 @@ show_code_node (int level, gfc_code *c) fputs ("ENDIF", dumpfile); break; + case EXEC_BLOCK: + show_indent (); + fputs ("BLOCK ", dumpfile); + ns = c->ext.block.ns; + show_namespace (ns); + show_indent (); + fputs ("END BLOCK ", dumpfile); + break; + case EXEC_SELECT: d = c->block; fputs ("SELECT CASE ", dumpfile);