public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "kd486 at cam dot ac.uk" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/98915] New: OpenACC routine with a name directive does not compile Date: Mon, 01 Feb 2021 11:49:18 +0000 [thread overview] Message-ID: <bug-98915-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98915 Bug ID: 98915 Summary: OpenACC routine with a name directive does not compile Product: gcc Version: 10.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: kd486 at cam dot ac.uk Target Milestone: --- Created attachment 50106 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50106&action=edit Module file to reproduce issue The OpenACC standard states that "The routine directive with a name may appear in the specification part of a subroutine, function or module, and applies to the named subroutine or function." However, the following does not compile with Gfortran: function modifier(x) result(y) implicit none !$acc routine seq real(kind =8) :: x,y y = 2 * x end function modifier subroutine do_work implicit none !$acc routine(modifier) seq integer(kind = 4) :: i !$acc parallel loop collapse(3) independent private(i) do i = 1,q x(i,j,k) = 23. x(i,j,k) = modifier(x(i)) end do end subroutine do_work gfortran -fopenacc -Wall -Wextra -c mymodule.f90 mymodule.f90:26:35: 26 | !$acc routine(modifier) seq | 1 Error: Invalid NAME ‘modifier’ in !$ACC ROUTINE ( NAME ) at (1)
next reply other threads:[~2021-02-01 11:49 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-02-01 11:49 kd486 at cam dot ac.uk [this message] 2021-02-01 11:58 ` [Bug fortran/98915] " kd486 at cam dot ac.uk 2021-02-01 14:19 ` [Bug fortran/98915] OpenACC 'routine with a name' " burnus at gcc dot gnu.org
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-98915-4@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).