From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 88510 invoked by alias); 23 Sep 2018 08:49:39 -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 88193 invoked by uid 89); 23 Sep 2018 08:49:11 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-24.4 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=rep.dot.nop@gmail.com, ReutnerFischer, Bernhard, sk:rep.dot X-HELO: mail-ot1-f67.google.com Received: from mail-ot1-f67.google.com (HELO mail-ot1-f67.google.com) (209.85.210.67) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 23 Sep 2018 08:49:08 +0000 Received: by mail-ot1-f67.google.com with SMTP id e18-v6so17087898oti.8; Sun, 23 Sep 2018 01:49:05 -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=L58nHLGCdb0D9ZyPpvHo24U2ByxxuSLHTMAWAG51u70=; b=Z2y1CviGBpgAfaqAccRtx0NP+pbJCl6BRDVjv5o10x5YAdK0o5tVgRFItmen0aiXmF ZF+BsJBvgQCennID4w0ogDQVGhseNpggDwixIARKsWL8bY86NgR0vpxnifVopdFKNXy7 4Kx4LI+9g2kHTsOEhlgzd0ndToD3AknbK+QXs+fpgUagCHt09KcbrwN6LODepvf4hPGo 90WH8O00wgFaV5IqdDTa3Z4lQH6m6Hph5uAyQyLpTh1KILg5MYR0gxA06cmOvYHl7w/e e0O5XlJcO8p10Ibu/MetJdyzvsTZ1fZ/A+t+8a1p8Ow4o53xrznS8fDJ8XdnMsqcLPu4 t41w== MIME-Version: 1.0 References: <20180920195908.04486d45@squid.athome> <20180921031422.5a080b4a@nbbrfq.loc> <20180921183159.2275bb0c@squid.athome> In-Reply-To: <20180921183159.2275bb0c@squid.athome> From: Bernhard Reutner-Fischer Date: Sun, 23 Sep 2018 08:49:00 -0000 Message-ID: Subject: Re: [PATCH, OpenACC] Fortran "declare create"/allocate support for OpenACC To: Julian Brown Cc: GCC Patches , Cesar Philippidis , Jakub Jelinek , gfortran Content-Type: text/plain; charset="UTF-8" X-IsSubscribed: yes X-SW-Source: 2018-09/txt/msg00173.txt.bz2 On Sat, 22 Sep 2018 at 00:32, Julian Brown wrote: > > On Fri, 21 Sep 2018 03:14:22 +0200 > Bernhard Reutner-Fischer wrote: > > > > diff --git a/gcc/fortran/trans-array.c b/gcc/fortran/trans-array.c > > > index 95ea615..2ac5908 100644 > > > --- a/gcc/fortran/trans-array.c > > > +++ b/gcc/fortran/trans-array.c > > > @@ -88,6 +88,7 @@ along with GCC; see the file COPYING3. If not see > > > #include "trans-types.h" > > > #include "trans-array.h" > > > #include "trans-const.h" > > > +#include "trans-stmt.h" > > > #include "dependency.h" > > > > please dont mix declarations and definitions, i.e. please put > > gfc_trans_oacc_declare_allocate() into trans-openmp.c, and add the > > declaration to trans.h, in the corresponding /* In trans-openmp.c */ > > block there. > > Do you mean like this? yes. @@ -6218,13 +6221,20 @@ add_clause (gfc_symbol *sym, gfc_omp_map_op map_op) { gfc_omp_namelist *n; + if (!module_oacc_clauses) + module_oacc_clauses = gfc_get_omp_clauses (); + + if (sym->backend_decl == NULL) + gfc_get_symbol_decl (sym); + + for (n = module_oacc_clauses->lists[OMP_LIST_MAP]; n != NULL; n = n->next) + if (n->sym->backend_decl == sym->backend_decl) + return; + Didn't look too close, but should this throw an error instead of silently returning, or was the error emitted earlier? Furthermore the testcase uses "call abort" which is non-standard. We recently moved to "STOP n" in the testsuite, please adjust the new testcases accordingly. Like (modulo typos, untested): $ cat abort_to_stop.awk ; echo EOF # awk -f ./abort_to_stop.awk < foo.f90 > x && mv x foo.f90 BEGIN { IGNORECASE = 1; i = 1 } { while (sub(/call\s\s*abort/, "stop " i)) {let i++;}; print $0; } EOF thanks,