From patchwork Thu Sep 15 23:08:27 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mikael Morin X-Patchwork-Id: 114867 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 0C070B70D1 for ; Fri, 16 Sep 2011 09:13:50 +1000 (EST) Received: (qmail 30416 invoked by alias); 15 Sep 2011 23:10:48 -0000 Received: (qmail 30363 invoked by uid 22791); 15 Sep 2011 23:10:45 -0000 X-SWARE-Spam-Status: No, hits=-0.7 required=5.0 tests=AWL, BAYES_00, SPF_NEUTRAL X-Spam-Check-By: sourceware.org Received: from eggs.gnu.org (HELO eggs.gnu.org) (140.186.70.92) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 15 Sep 2011 23:10:26 +0000 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R4L4Z-00010X-MD for gcc-patches@gcc.gnu.org; Thu, 15 Sep 2011 19:10:25 -0400 Received: from smtp22.services.sfr.fr ([93.17.128.11]:5344) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R4L2i-0000FL-E1; Thu, 15 Sep 2011 19:08:28 -0400 Received: from filter.sfr.fr (localhost [127.0.0.1]) by msfrf2208.sfr.fr (SMTP Server) with ESMTP id A25547000185; Fri, 16 Sep 2011 01:08:27 +0200 (CEST) Received: from gimli.local (118.183.72.86.rev.sfr.net [86.72.183.118]) by msfrf2208.sfr.fr (SMTP Server) with ESMTP id 69780700015C; Fri, 16 Sep 2011 01:08:27 +0200 (CEST) X-SFR-UUID: 20110915230827432.69780700015C@msfrf2208.sfr.fr MIME-Version: 1.0 From: Mikael Morin To: gfortran , GCC patches Message-ID: <20110915230827.28513.18093@gimli.local> In-Reply-To: <20110915230813.28513.97419@gimli.local> References: <20110915230813.28513.97419@gimli.local> Subject: [Patch, fortran] [06/21] Remove coarray support in the scalarizer: Request coarray for an actual arg associed with a coarray dummy Date: Fri, 16 Sep 2011 01:08:27 +0200 (CEST) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 93.17.128.11 X-IsSubscribed: yes 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 This one is more controversial and I need input from a coarray-fluent guy, for example Tobias. As I introduced the want_coarray flag (see previous patch), it made sense to me to also set want_coarray for coarray dummies. After some more thought, I decided to restrict further want_coarray to assumed shape coarray dummies. The patch does that. However, what comes up from testing is that neither is needed. I'm not submiting this patch for approval, I'm submitting it to understand why it is not necessary. How are cobounds passed to a coarray dummy? 2011-09-14 Mikael Morin * trans-expr.c (gfc_conv_procedure_call): Set want_coarray flag if the dummy argument is an assumed-shape coarray. diff --git a/trans-expr.c b/trans-expr.c index 131927c..80447fa 100644 --- a/trans-expr.c +++ b/trans-expr.c @@ -2990,8 +2990,12 @@ gfc_conv_procedure_call (gfc_se * se, gfc_symbol * sym, { /* A scalar or transformational function. */ gfc_init_se (&parmse, NULL); - argss = gfc_walk_expr (e); + if (fsym && fsym->attr.codimension + && (fsym->as->cotype == AS_ASSUMED_SHAPE + || fsym->as->cotype == AS_DEFERRED)) + parmse.want_coarray = 1; + argss = gfc_walk_expr (e); if (argss == gfc_ss_terminator) { if (e->expr_type == EXPR_VARIABLE