From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5276 invoked by alias); 20 Sep 2018 15:56:42 -0000 Mailing-List: contact fortran-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: fortran-owner@gcc.gnu.org Received: (qmail 5256 invoked by uid 89); 20 Sep 2018 15:56:41 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-6.5 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,GIT_PATCH_1,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:2379, sk:gfc_tra, H*c:alternative X-HELO: mail-yb1-f172.google.com Received: from mail-yb1-f172.google.com (HELO mail-yb1-f172.google.com) (209.85.219.172) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 20 Sep 2018 15:56:40 +0000 Received: by mail-yb1-f172.google.com with SMTP id d9-v6so4114408ybr.12; Thu, 20 Sep 2018 08:56:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=9o2bEmIpZ9HIfg52OebwHmzNETH/Skz/3aHXqwfAK7c=; b=Tls2+l/89vt1QBHbhadNLSrfqkqqatpvpPH4N+Tv9cMoSZPk+PCzv13vP+p7lj5iCp odRyOKk2mjOWyg5DdqeKc0KXYlfeOK4XS6Olw/0xT8/agA9hgiDN/NRVZgUldWgUKotA xciPgcCx9+8GCyPRSUNJx9cePJapDponPgKedcsJOy9Sii7SmVloSDMBAidNo6EVdZ6l mbylteM5gRRUKI610UF1TqfcJrTlR7sZq1mb58Frrb3MgR/uSEpe8zCKef+QFK6838yX y0le5Fvt63/66EzvNm4fcfSWA5NLpLwIi9snBU3F9f/hRmaBODEqn4NK/tUq8U0hDpri Rxkw== MIME-Version: 1.0 References: <024e798b9539b765a1259cfc9cb2f1dc480b24ca.1536144068.git.ams@codesourcery.com> <7f5064c3-afc6-b7b5-cade-f03af5b86331@moene.org> <9290b55e-b12a-838a-5943-0c72d040dc3f@codesourcery.com> In-Reply-To: <9290b55e-b12a-838a-5943-0c72d040dc3f@codesourcery.com> From: Janne Blomqvist Date: Thu, 20 Sep 2018 15:56:00 -0000 Message-ID: Subject: Re: [PATCH 08/25] Fix co-array allocation To: ams@codesourcery.com Cc: Toon Moene , GCC Patches , Fortran List Content-Type: text/plain; charset="UTF-8" X-IsSubscribed: yes X-SW-Source: 2018-09/txt/msg00142.txt.bz2 On Wed, Sep 19, 2018 at 7:24 PM Andrew Stubbs wrote: > On 05/09/18 19:07, Janne Blomqvist wrote: > > The argument must be of type size_type_node, not sizetype. Please instead > > use > > > > size = build_zero_cst (size_type_node); > > > > > >> * trans-intrinsic.c (conv_intrinsic_event_query): Convert > computed > >> index to a size_t type. > >> > > > > Using integer_type_node is wrong, but the correct type for calculating > > array indices (lbound, ubound, etc.) is not size_type_node but rather > > gfc_array_index_type (which in practice maps to ptrdiff_t). So please use > > that, and then fold_convert index to size_type_node just before > generating > > the call to event_query. > > > > > >> * trans-stmt.c (gfc_trans_event_post_wait): Likewise. > >> > > > > Same here as above. > > How is the attached? I retested and found no regressions. > > Andrew > Ok, looks good. There are some other remaining incorrect uses of integer_type_node (at least one visible in the diff), but that can be done as a separate patch (not saying you must do it as a precondition for anything, though it would of course be nice if you would. :) ) -- Janne Blomqvist