From patchwork Fri Dec 3 12:25:29 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [fortran, committed] Avoid infinite recursion in -fdump-fortran-original Date: Fri, 03 Dec 2010 02:25:29 -0000 From: Thomas Koenig X-Patchwork-Id: 74129 Message-Id: <1291379129.7162.6.camel@linux-fd1f.site> To: fortran@gcc.gnu.org Cc: gcc-patches@gcc.gnu.org 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 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);