This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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.

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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]