From patchwork Thu Sep 15 23:08:34 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mikael Morin X-Patchwork-Id: 114862 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 20B61B6F62 for ; Fri, 16 Sep 2011 09:13:18 +1000 (EST) Received: (qmail 28624 invoked by alias); 15 Sep 2011 23:10:16 -0000 Received: (qmail 28558 invoked by uid 22791); 15 Sep 2011 23:10:15 -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:01 +0000 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R4L2p-0000Ix-TQ for gcc-patches@gcc.gnu.org; Thu, 15 Sep 2011 19:08:36 -0400 Received: from smtp22.services.sfr.fr ([93.17.128.11]:5396) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R4L2o-0000Gh-Qq; Thu, 15 Sep 2011 19:08:34 -0400 Received: from filter.sfr.fr (localhost [127.0.0.1]) by msfrf2208.sfr.fr (SMTP Server) with ESMTP id 8E52F700016B; Fri, 16 Sep 2011 01:08:34 +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 5A2B5700015C; Fri, 16 Sep 2011 01:08:34 +0200 (CEST) X-SFR-UUID: 20110915230834369.5A2B5700015C@msfrf2208.sfr.fr MIME-Version: 1.0 From: Mikael Morin To: gfortran , GCC patches Message-ID: <20110915230834.28513.55958@gimli.local> In-Reply-To: <20110915230813.28513.97419@gimli.local> References: <20110915230813.28513.97419@gimli.local> Subject: [Patch, fortran] [09/21] Remove coarray support in the scalarizer: Accept coarray dimensions in gfc_conv_section_startstride Date: Fri, 16 Sep 2011 01:08:34 +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 Currently, gfc_walk_variable_expr changes codimension's type from DIMEN_THIS_IMAGE to DIMEN_RANGE so that it looks like a regular array. We are going to remove that but still want to call gfc_conv_section_startstride on the coarray dimensions to get the cobounds. This patch relaxes an assertion in gfc_conv_section_startstride to accept coarray dimensions. OK? 2011-09-14 Mikael Morin * trans-array.c (gfc_conv_section_startstride): Update assertion to also accept coarrays. diff --git a/trans-array.c b/trans-array.c index 7cc86ba..7f44514 100644 --- a/trans-array.c +++ b/trans-array.c @@ -3204,7 +3204,8 @@ gfc_conv_section_startstride (gfc_loopinfo * loop, gfc_ss * ss, int dim, return; } - gcc_assert (ar->dimen_type[dim] == DIMEN_RANGE); + gcc_assert (ar->dimen_type[dim] == DIMEN_RANGE + || ar->dimen_type[dim] == DIMEN_THIS_IMAGE); desc = info->descriptor; start = ar->start[dim]; end = ar->end[dim];