diff mbox

[fortran,committed] Avoid infinite recursion in -fdump-fortran-original

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

Commit Message

Thomas Koenig Dec. 3, 2010, 12:25 p.m. UTC
Hello world,

the attached patch was committed as obvious as rev. 167416.  I mentioned
the PR in the changelog because that was the test case I found the bug
in.

	Thomas 

2010-12-03  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/44352
	* dump-parse-tree.c (show_symbol):  Don't show formal namespace
	for statement functions in order to avoid infinite recursion.
diff mbox

Patch

Index: dump-parse-tree.c
===================================================================
--- dump-parse-tree.c	(Revision 167365)
+++ dump-parse-tree.c	(Arbeitskopie)
@@ -889,7 +889,8 @@  show_symbol (gfc_symbol *sym)
 	}
     }
 
-  if (sym->formal_ns && (sym->formal_ns->proc_name != sym))
+  if (sym->formal_ns && (sym->formal_ns->proc_name != sym)
+      && sym->attr.proc != PROC_ST_FUNCTION)
     {
       show_indent ();
       fputs ("Formal namespace", dumpfile);