diff mbox

[fortran] PR 44678, BLOCK and SELECT TYPE with -fdump-parse-tree

Message ID 1277590371.6952.10.camel@linux-fd1f.site
State New
Headers show

Commit Message

Thomas Koenig June 26, 2010, 10:12 p.m. UTC
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  <tkoenig@gcc.gnu.org>

	PR fortran/44678
	* dump-parse-tree.c (show_code_node):  Show namespace for
	EXEC_BLOCK.

Comments

Jerry DeLisle June 26, 2010, 10:15 p.m. UTC | #1
On 06/26/2010 03:12 PM, Thomas Koenig wrote:
> 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?
>
Yes OK, seems fairly safe.

Jerry
Thomas Koenig June 26, 2010, 10:55 p.m. UTC | #2
Jerry DeLisle wrote:
> On 06/26/2010 03:12 PM, Thomas Koenig wrote:
> s?
> >
> Yes OK, seems fairly safe.

Sende          fortran/ChangeLog
Sende          fortran/dump-parse-tree.c
Übertrage Daten ..
Revision 161444 übertragen.

Thanks for the review!

	Thomas
diff mbox

Patch

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);