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

login
register
mail settings
Submitter Thomas Koenig
Date June 26, 2010, 10:12 p.m.
Message ID <1277590371.6952.10.camel@linux-fd1f.site>
Download mbox | patch
Permalink /patch/57076/
State New
Headers show

Comments

Thomas Koenig - June 26, 2010, 10:12 p.m.
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.
Jerry DeLisle - June 26, 2010, 10:15 p.m.
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.
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

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