From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 53661 invoked by alias); 4 Nov 2015 17:15:40 -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 53646 invoked by uid 89); 4 Nov 2015 17:15:39 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 04 Nov 2015 17:15:32 +0000 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=SVR-IES-FEM-01.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1Zu1ej-0002s8-D5 from Thomas_Schwinge@mentor.com ; Wed, 04 Nov 2015 09:15:29 -0800 Received: from feldtkeller.schwinge.homeip.net (137.202.0.76) by SVR-IES-FEM-01.mgc.mentorg.com (137.202.0.104) with Microsoft SMTP Server id 14.3.224.2; Wed, 4 Nov 2015 17:15:28 +0000 From: Thomas Schwinge To: Cesar Philippidis CC: "gcc-patches@gcc.gnu.org" , Jakub Jelinek Subject: Re: [openacc] acc loop updates in fortran In-Reply-To: <5639764A.2000209@codesourcery.com> References: <5639764A.2000209@codesourcery.com> User-Agent: Notmuch/0.9-125-g4686d11 (http://notmuchmail.org) Emacs/24.5.1 (i586-pc-linux-gnu) Date: Wed, 04 Nov 2015 17:15:00 -0000 Message-ID: <87ziytznx9.fsf@kepler.schwinge.homeip.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" X-SW-Source: 2015-11/txt/msg00378.txt.bz2 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Content-length: 3648 Hi Cesar! On Tue, 3 Nov 2015 19:06:50 -0800, Cesar Philippidis wrote: > This patch updates the fortran front end so that it supports the acc > loop clauses in a similar manner to both the c and c++ front ends in > addition to addressing a couple of other loose ends. > --- a/gcc/fortran/openmp.c > +++ b/gcc/fortran/openmp.c > @@ -3028,6 +3015,22 @@ resolve_omp_clauses (gfc_code *code, gfc_omp_claus= es *omp_clauses, > n->sym->mark =3D 1; > } >=20=20 > + /* OpenACC reductions. */ > + if (openacc) > + { > + for (n =3D omp_clauses->lists[OMP_LIST_REDUCTION]; n; n =3D n->nex= t) > + n->sym->mark =3D 0; Maybe I'm just confugsed, but if setting all these to zero here... > + > + for (n =3D omp_clauses->lists[OMP_LIST_REDUCTION]; n; n =3D n->nex= t) > + { > + if (n->sym->mark) > + gfc_error ("Symbol %qs present on multiple clauses at %L", > + n->sym->name, &n->where); > + else > + n->sym->mark =3D 1; ... won't this just always run into the "else" branch? > --- a/gcc/fortran/trans-openmp.c > +++ b/gcc/fortran/trans-openmp.c > @@ -3449,16 +3478,28 @@ gfc_trans_oacc_combined_directive (gfc_code *code) > sizeof (construct_clauses)); > loop_clauses.collapse =3D construct_clauses.collapse; > [...] > - construct_clauses.collapse =3D 0; Again I'm confused by this, why this is being removed, as earlier in . > --- /dev/null > +++ b/gcc/testsuite/gfortran.dg/goacc/combined-directives.f90 I suggest you also merge the existing gcc/testsuite/gfortran.dg/goacc/combined_loop.f90 into your new test case file (consistent naming, with the other combined-directives* files). > @@ -0,0 +1,152 @@ > +! Exercise combined OpenACC directives. > + > +! { dg-do compile } > +! { dg-options "-fopenacc -fdump-tree-gimple" } > + > +! { dg-prune-output "sorry, unimplemented" } What's still unimplemented here? Please add a comment, or put the dg-prune-output directive next to the offending OpenACC directive, so we'll be sure to remove it later on. > --- /dev/null > +++ b/gcc/testsuite/gfortran.dg/goacc/loop-5.f95 > @@ -0,0 +1,363 @@ > +! { dg-do compile } > +! { dg-additional-options "-fmax-errors=3D100" } > + > +! { dg-prune-output "sorry, unimplemented" } Likewise. > +! { dg-prune-output "Error: work-sharing region" } What's the intention of this? If we're expecting this error, place dg-error directives where they belong? > --- /dev/null > +++ b/gcc/testsuite/gfortran.dg/goacc/loop-6.f95 > @@ -0,0 +1,80 @@ > +! { dg-do compile } > +! { dg-additional-options "-fmax-errors=3D100" } > + > +! { dg-prune-output "sorry, unimplemented" } Likewise. > +! { dg-prune-output "Error: work-sharing region" } Likewise. > --- a/gcc/testsuite/gfortran.dg/goacc/loop-tree-1.f90 > +++ b/gcc/testsuite/gfortran.dg/goacc/loop-tree-1.f90 > @@ -3,6 +3,9 @@ >=20=20 > ! test for tree-dump-original and spaces-commas >=20=20 > +! { dg-prune-output "sorry, unimplemented" } Likewise. > +! { dg-prune-output "Error: work-sharing region" } Likewise. > --- a/gcc/testsuite/gfortran.dg/goacc/parallel-tree.f95 > +++ b/gcc/testsuite/gfortran.dg/goacc/parallel-tree.f95 > @@ -37,4 +37,3 @@ end program test >=20=20 > ! { dg-final { scan-tree-dump-times "map\\(force_deviceptr:u\\)" 1 "orig= inal" } }=20 > ! { dg-final { scan-tree-dump-times "private\\(v\\)" 1 "original" } }=20 > -! { dg-final { scan-tree-dump-times "firstprivate\\(w\\)" 1 "original" }= }=20 Which of your source code changes does this change related to? Gr=C3=BC=C3=9Fe Thomas --=-=-= Content-Type: application/pgp-signature; name="signature.asc" Content-length: 472 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJWOj0jAAoJEK3/DN1sMFFtywwH/RC00B2MhwqUg89K8RCVRMK4 o4eVevjfMC51YWOXAjbkLMe1HRDOx5UNlW05ibJxWOj96yW8/VuizeTElMtPPchU DCA+YvMFGKybeFO6IItWywiKbvfVq70+Tizk9rEhXZajnHVRxL9GvtLYhc6eURDe KXmlyuoVPG9xsKuhTreDvyX/S411xj5L6NmYYFadQpSaLTRJxThJ+kXs8LZsF49I TerXbwquzYBvk7W+4NaLC/ovWw2irLXld6TS1zMTdNsdXA+5GKw4K94PM5nXQXSM bpQeVzfeS1maSFzAtRyKJvOjDJIIl/WbjUyAOQ28X0hAmNpJaN6ikPLIlTXA5TE= =f38d -----END PGP SIGNATURE----- --=-=-=--