This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
[patch, fortran, committed] Avoid infinite recursion in -fdump-fortran-original
- From: Thomas Koenig <tkoenig at netcologne dot de>
- To: fortran at gcc dot gnu dot org
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Fri, 03 Dec 2010 13:25:29 +0100
- Subject: [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);