public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "burnus at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/98014] [Fortran][OpenACC][OpenMP] Empty '!$acc'/'!$omp' continuation line rejected Date: Mon, 15 Feb 2021 12:08:26 +0000 [thread overview] Message-ID: <bug-98014-4-Kr56nrIjMn@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-98014-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98014 Tobias Burnus <burnus at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|[Fortran OpenACC] Empty |[Fortran][OpenACC][OpenMP] |'!$acc' continuation line |Empty '!$acc'/'!$omp' |rejected |continuation line rejected Keywords| |openmp --- Comment #2 from Tobias Burnus <burnus at gcc dot gnu.org> --- The following compiles here: !$acc parallel & !$acc vector_length (1) & !$acc& ! { dg-warning } !$acc end parallel end If I remove the '&' after '!$acc', I get the error: 2 | !$acc vector_length (1) & | 1 Error: Failed to match clause at (1) Same with OpenMP. * * * I think there is a bug in gfortran to not accept the first version – and not to reject the second version which should be invalid for the reasons given below. * * * In any case, I believe this is an omission in the OpenACC and OpenMP specs which does not tell how to understand that line. Namely, the following is ambiguous: !$omp parallel & !$omp & !$omp if(.false.) vs. !$omp parallel & !$omp & !$omp do Is the 'omp &' line the last line of the directive? Of just in the middle of a three-line directive? For Fortran itself, a single '&' is invalid in free from for the same reasons. → "No line shall contain a single “&” as the only nonblank character or as the only nonblank character before an “!” that initiates a comment." (F2018, 6.3.2.4 Free form statement continuation). * * * On the specification side, I have opened a ticked * for OpenACC, Issue 353 * for OpenMP, Issue 2668.
prev parent reply other threads:[~2021-02-15 12:08 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-11-26 11:20 [Bug fortran/98014] New: [Fortran OpenACC] Empty '!$acc' " tschwinge at gcc dot gnu.org 2021-02-14 18:02 ` [Bug fortran/98014] " dominiq at lps dot ens.fr 2021-02-15 10:25 ` jakub at gcc dot gnu.org 2021-02-15 12:08 ` burnus at gcc dot gnu.org [this message]
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=bug-98014-4-Kr56nrIjMn@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /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: linkBe 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).