From patchwork Fri Dec 3 12:25:29 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Koenig X-Patchwork-Id: 74129 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 9D84FB6F11 for ; Fri, 3 Dec 2010 23:25:49 +1100 (EST) Received: (qmail 1420 invoked by alias); 3 Dec 2010 12:25:41 -0000 Received: (qmail 1397 invoked by uid 22791); 3 Dec 2010 12:25:40 -0000 X-SWARE-Spam-Status: No, hits=2.3 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_NONE, RCVD_IN_JMF_BL, RCVD_IN_JMF_BR, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from cc-smtpout2.netcologne.de (HELO cc-smtpout2.netcologne.de) (89.1.8.212) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 03 Dec 2010 12:25:33 +0000 Received: from cc-smtpin2.netcologne.de (cc-smtpin2.netcologne.de [89.1.8.202]) by cc-smtpout2.netcologne.de (Postfix) with ESMTP id 9696312A9B; Fri, 3 Dec 2010 13:25:30 +0100 (CET) Received: from [192.168.0.197] (xdsl-78-35-157-99.netcologne.de [78.35.157.99]) by cc-smtpin2.netcologne.de (Postfix) with ESMTPA id 7FDC411E89; Fri, 3 Dec 2010 13:25:29 +0100 (CET) Subject: [patch, fortran, committed] Avoid infinite recursion in -fdump-fortran-original From: Thomas Koenig To: fortran@gcc.gnu.org Cc: gcc-patches@gcc.gnu.org Date: Fri, 03 Dec 2010 13:25:29 +0100 Message-ID: <1291379129.7162.6.camel@linux-fd1f.site> Mime-Version: 1.0 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list 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);