From patchwork Tue Jul 20 22:01:14 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Koenig X-Patchwork-Id: 59377 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 7F1C3B6EE8 for ; Wed, 21 Jul 2010 08:01:33 +1000 (EST) Received: (qmail 17453 invoked by alias); 20 Jul 2010 22:01:30 -0000 Received: (qmail 16937 invoked by uid 22791); 20 Jul 2010 22:01:26 -0000 X-SWARE-Spam-Status: No, hits=-1.0 required=5.0 tests=AWL, BAYES_00, KAM_STOCKGEN, RCVD_IN_DNSWL_NONE, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from smtp6.netcologne.de (HELO smtp6.netcologne.de) (194.8.194.26) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 20 Jul 2010 22:01:18 +0000 Received: from [192.168.0.196] (xdsl-213-168-117-96.netcologne.de [213.168.117.96]) by smtp6.netcologne.de (Postfix) with ESMTP id D90BE2A0C0F; Wed, 21 Jul 2010 00:01:14 +0200 (CEST) Subject: Re: [patch, fortran] PR 40628, front-end optimization pass From: Thomas Koenig To: fortran@gcc.gnu.org Cc: gcc-patches@gcc.gnu.org In-Reply-To: References: <1279391905.4628.7.camel@linux-fd1f.site> <4C42BF4D.20400@domob.eu> <4C43D07A.9050500@verizon.net> <1279578709.9185.9.camel@linux-fd1f.site> <4C44F9A4.1080908@verizon.net> <4C4558AF.60309@net-b.de> <4C455DAD.9020509@domob.eu> <4C456FE6.7010805@moene.org> Date: Wed, 21 Jul 2010 00:01:14 +0200 Message-ID: <1279663274.29693.4.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 Well, here is an updated version of the patch. I have called the new file (mostly unchanged) frontend-passes.c, because my gdb gets confused about having two files called passes.c. I have also changed the place where the gfc_run_passes is called to resolve.c, as pault had suggested on IRC. Regression-tested, only allocate_with_typespec.f90 failed (which I also saw on gcc-testresults). OK? Thomas 2010-07-20 Thomas Koenig * Make-lang.in: Add fortran/frontend-passes.o. * gfortran.h: Add prototype for gfc_run_passes. * resolve.c (gfc_resolve): Call gfc_run_passes. * frontend-passes.c: New file. 2010-0717 Thomas Koenig * trim_optimize_1.f90: New test. * character_comparision_1.f90: New test. Index: Make-lang.in =================================================================== --- Make-lang.in (Revision 162346) +++ Make-lang.in (Arbeitskopie) @@ -66,7 +66,7 @@ fortran/trans.o fortran/trans-array.o fortran/trans-common.o \ fortran/trans-const.o fortran/trans-decl.o fortran/trans-expr.o \ fortran/trans-intrinsic.o fortran/trans-io.o fortran/trans-openmp.o \ - fortran/trans-stmt.o fortran/trans-types.o + fortran/trans-stmt.o fortran/trans-types.o fortran/frontend-passes.o fortran_OBJS = $(F95_OBJS) gfortranspec.o Index: gfortran.h =================================================================== --- gfortran.h (Revision 162346) +++ gfortran.h (Arbeitskopie) @@ -2831,4 +2831,8 @@ #define CLASS_DATA(sym) sym->ts.u.derived->components +/* passes.c */ + +void gfc_run_passes (gfc_namespace *); + #endif /* GCC_GFORTRAN_H */ Index: resolve.c =================================================================== --- resolve.c (Revision 162346) +++ resolve.c (Arbeitskopie) @@ -13068,4 +13068,6 @@ gfc_current_ns = old_ns; cs_base = old_cs_base; ns->resolved = 1; + + gfc_run_passes (ns); }