From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 51778 invoked by alias); 4 Nov 2015 10:30:36 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 51764 invoked by uid 89); 4 Nov 2015 10:30:35 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Wed, 04 Nov 2015 10:30:34 +0000 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (Postfix) with ESMTPS id 8D8634D; Wed, 4 Nov 2015 10:30:33 +0000 (UTC) Received: from tucnak.zalov.cz (ovpn-116-136.ams2.redhat.com [10.36.116.136]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id tA4AUViu014980 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 4 Nov 2015 05:30:32 -0500 Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.15.2/8.15.2) with ESMTP id tA4AUTr1027340; Wed, 4 Nov 2015 11:30:30 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.15.2/8.15.2/Submit) id tA4AUSmS027339; Wed, 4 Nov 2015 11:30:28 +0100 Date: Wed, 04 Nov 2015 10:30:00 -0000 From: Jakub Jelinek To: Cesar Philippidis Cc: "gcc-patches@gcc.gnu.org" Subject: Re: [openacc] acc loop updates in fortran Message-ID: <20151104103028.GC478@tucnak.redhat.com> Reply-To: Jakub Jelinek References: <5639764A.2000209@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5639764A.2000209@codesourcery.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-IsSubscribed: yes X-SW-Source: 2015-11/txt/msg00317.txt.bz2 On Tue, Nov 03, 2015 at 07:06:50PM -0800, Cesar Philippidis wrote: > @@ -856,13 +857,14 @@ gfc_match_omp_clauses (gfc_omp_clauses **cp, uint64_t mask, > if ((mask & OMP_CLAUSE_DEFAULT) > && c->default_sharing == OMP_DEFAULT_UNKNOWN) > { > - if (gfc_match ("default ( shared )") == MATCH_YES) > + if (!openacc && gfc_match ("default ( shared )") == MATCH_YES) > c->default_sharing = OMP_DEFAULT_SHARED; > - else if (gfc_match ("default ( private )") == MATCH_YES) > + else if (!openacc && gfc_match ("default ( private )") == MATCH_YES) > c->default_sharing = OMP_DEFAULT_PRIVATE; > else if (gfc_match ("default ( none )") == MATCH_YES) > c->default_sharing = OMP_DEFAULT_NONE; > - else if (gfc_match ("default ( firstprivate )") == MATCH_YES) > + else if (!openacc > + && gfc_match ("default ( firstprivate )") == MATCH_YES) > c->default_sharing = OMP_DEFAULT_FIRSTPRIVATE; I'd rewrite this as: if (gfc_match ("default ( none )") == MATCH_YES) c->default_sharing = OMP_DEFAULT_NONE; else if (openacc) /* c->default_sharing = OMP_DEFAULT_UNKNOWN */; else if (gfc_match ("default ( shared )") == MATCH_YES) ... > if (c->default_sharing != OMP_DEFAULT_UNKNOWN) > continue; > @@ -1304,10 +1306,19 @@ match > gfc_match_oacc_update (void) > { > gfc_omp_clauses *c; > + locus here = gfc_current_locus; > + > if (gfc_match_omp_clauses (&c, OACC_UPDATE_CLAUSES, false, false, true) > != MATCH_YES) > return MATCH_ERROR; > > + if (!c->lists[OMP_LIST_MAP]) > + { > + gfc_error ("% must contain at least one " > + "% or % clause at %L", &here); There is no host/self clause I'd guess, so you should spell those separately. Otherwise, LGTM. Jakub