From: Thomas Schwinge <thomas@codesourcery.com>
To: Cesar Philippidis <cesar@codesourcery.com>
Cc: "gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>,
Fortran List <fortran@gcc.gnu.org>,
Tobias Burnus <tobias.burnus@physik.fu-berlin.de>,
Jakub Jelinek <jakub@redhat.com>
Subject: Re: [WIP] [PR fortran/72741] Rework Fortran OpenACC routine clause handling
Date: Tue, 16 Aug 2016 22:17:00 -0000 [thread overview]
Message-ID: <87fuq4gy0m.fsf@hertz.schwinge.homeip.net> (raw)
In-Reply-To: <001e7a79-d2d8-fa63-2b88-20a346f3b4a7@codesourcery.com>
Hi!
On Mon, 15 Aug 2016 18:54:49 -0700, Cesar Philippidis <cesar@codesourcery.com> wrote:
> For the moment, I'm ignoring the
> device_type problem and handling all of the matching errors in
> gfc_match_oacc_routine.
OK for the moment; my idea has been to do it generally enough already
now, using generic infrastructure I have been/will be adding for C/C++,
so that device_type support will later be simple to implement for all
three front ends. But, let's leave that aside for the moment.
> You're patch was handling those errors in
> add_attributes_to_decls, which I think is too late.
I can't tell why that's "too late". Anyway, we can save this discussion
for later. ;-)
> Thomas, does this patch ok to you for gomp4?
Yes, please commit, so that we can move this whole thing forward. :-)
A few quick comments anyway:
> --- a/gcc/fortran/openmp.c
> +++ b/gcc/fortran/openmp.c
> @@ -1993,19 +2002,24 @@ gfc_match_oacc_routine (void)
> dims = gfc_oacc_routine_dims (c);
> if (dims == OACC_FUNCTION_NONE)
> {
> gfc_error ("Multiple loop axes specified in !$ACC ROUTINE at %C");
> - goto cleanup;
> +
> + /* Don't abort early, because it's important to let the user
> + know of any potential duplicate routine directives. */
> + seen_error = true;
> }
Hmm, I don't know if that's really important? I mean, if we run into
"Multiple loop axes specified", that is a hard semantic error already?
Anyway, this can be reconsidered later.
> if (isym != NULL)
> {
> if (c && (c->gang || c->worker || c->vector))
> {
> - gfc_error ("Intrinsic function specified in !$ACC ROUTINE ( NAME )"
> - " at %C, with incompatible GANG, WORKER, or VECTOR clause");
> + gfc_error ("Intrinsic symbol specified in !$ACC ROUTINE ( NAME ) "
> + "at %C, with incompatible clauses specifying the level "
> + "of parallelism");
> goto cleanup;
> }
You're re-introducing the wording I had used earlier, before I changed
that to the more specific one mentioning the clause names. Why change
that again? Also something the can be reconsidered later. (Goes
together with the gcc/testsuite/gfortran.dg/goacc/pr72741-intrinsic-2.f
changes.)
> --- a/gcc/testsuite/gfortran.dg/goacc/pr72741-intrinsic-1.f
> +++ b/gcc/testsuite/gfortran.dg/goacc/pr72741-intrinsic-1.f
> @@ -1,17 +1,13 @@
> -! Check for valid clauses with intrinsic function specified in !$ACC ROUTINE ( NAME ).
> -
> SUBROUTINE sub_1
> IMPLICIT NONE
> -!$ACC ROUTINE (ABORT)
> -!$ACC ROUTINE (ABORT) SEQ
> +!$ACC ROUTINE (ABORT) SEQ VECTOR ! { dg-error "Intrinsic symbol specified in \\!\\\$ACC ROUTINE \\( NAME \\) at \\(1\\), with incompatible clauses specifying the level of parallelism" }
>
> CALL ABORT
> END SUBROUTINE sub_1
>
> MODULE m_w_1
> IMPLICIT NONE
> -!$ACC ROUTINE (ABORT) SEQ
> -!$ACC ROUTINE (ABORT)
> +!$ACC ROUTINE (ABORT) VECTOR GANG ! { dg-error "Intrinsic symbol specified in \\!\\\$ACC ROUTINE \\( NAME \\) at \\(1\\), with incompatible clauses specifying the level of parallelism" }
This changes the intention of this test file? Another thing that can be
reconsidered later.
So, please commit as-is, and I'll then base my other changes on top of
that.
Grüße
Thomas
next prev parent reply other threads:[~2016-08-16 22:17 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-28 2:54 [gomp4] encode acc routine clauses inside fortran module files Cesar Philippidis
2016-07-29 4:21 ` [gomp4] Fix PR72741 Cesar Philippidis
2016-07-01 20:41 ` [PATCH] OpenACC routines in fortran modules Cesar Philippidis
2016-07-28 9:55 ` Tobias Burnus
2016-07-28 21:33 ` Cesar Philippidis
2016-08-11 15:19 ` [WIP] [PR fortran/72741] Rework Fortran OpenACC routine clause handling (was: [PATCH] OpenACC routines in fortran modules) Thomas Schwinge
2016-08-11 15:40 ` Jakub Jelinek
2016-08-11 16:27 ` Thomas Schwinge
2016-08-11 16:42 ` Jakub Jelinek
2016-08-16 1:55 ` [WIP] [PR fortran/72741] Rework Fortran OpenACC routine clause handling Cesar Philippidis
2016-08-16 22:17 ` Thomas Schwinge [this message]
2019-02-28 21:12 ` [PR72741, PR89433] Repeated use of the Fortran OpenACC 'routine' directive Thomas Schwinge
2019-03-21 20:01 ` Thomas Schwinge
2016-08-11 16:44 ` [WIP] [PR fortran/72741] Rework Fortran OpenACC routine clause handling Cesar Philippidis
2019-02-28 20:52 ` [PR72741] For all Fortran OpenACC 'routine' directive variants check for multiple clauses specifying the level of parallelism Thomas Schwinge
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87fuq4gy0m.fsf@hertz.schwinge.homeip.net \
--to=thomas@codesourcery.com \
--cc=cesar@codesourcery.com \
--cc=fortran@gcc.gnu.org \
--cc=gcc-patches@gcc.gnu.org \
--cc=jakub@redhat.com \
--cc=tobias.burnus@physik.fu-berlin.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).