From patchwork Sat Jun 26 22:12:51 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Koenig X-Patchwork-Id: 57076 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 9BF83B6EFF for ; Sun, 27 Jun 2010 08:13:03 +1000 (EST) Received: (qmail 2932 invoked by alias); 26 Jun 2010 22:13:00 -0000 Received: (qmail 2916 invoked by uid 22791); 26 Jun 2010 22:12:59 -0000 X-SWARE-Spam-Status: No, hits=-0.9 required=5.0 tests=AWL, BAYES_20, RCVD_IN_DNSWL_NONE, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from smtp5.netcologne.de (HELO smtp5.netcologne.de) (194.8.194.25) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 26 Jun 2010 22:12:55 +0000 Received: from [192.168.0.197] (xdsl-213-168-119-248.netcologne.de [213.168.119.248]) by smtp5.netcologne.de (Postfix) with ESMTP id 13C7E40C7DE; Sun, 27 Jun 2010 00:12:52 +0200 (CEST) Subject: [patch, fortran] PR 44678, BLOCK and SELECT TYPE with -fdump-parse-tree From: Thomas Koenig To: fortran@gcc.gnu.org Cc: gcc-patches@gcc.gnu.org Date: Sun, 27 Jun 2010 00:12:51 +0200 Message-ID: <1277590371.6952.10.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 fixes a problem with -fdump-parse-tree, where BLOCKs and SELECT TYPE lead to an ICE. Currently regtesting; I don't expect any regressions because the testsite does not use -fdump-parse-tree (maybe it should...) OK for trunk if regtesting passes? Thomas 2010-06-27 Thomas Koenig PR fortran/44678 * dump-parse-tree.c (show_code_node): Show namespace for EXEC_BLOCK. Index: dump-parse-tree.c =================================================================== --- dump-parse-tree.c (Revision 161427) +++ dump-parse-tree.c (Arbeitskopie) @@ -1177,6 +1177,7 @@ show_code_node (int level, gfc_code *c) gfc_filepos *fp; gfc_inquire *i; gfc_dt *dt; + gfc_namespace *ns; code_indent (level, c->here); @@ -1376,6 +1377,15 @@ show_code_node (int level, gfc_code *c) fputs ("ENDIF", dumpfile); break; + case EXEC_BLOCK: + show_indent (); + fputs ("BLOCK ", dumpfile); + ns = c->ext.block.ns; + show_namespace (ns); + show_indent (); + fputs ("END BLOCK ", dumpfile); + break; + case EXEC_SELECT: d = c->block; fputs ("SELECT CASE ", dumpfile);