public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "john.donners at atos dot net" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/69090] Allocatable arrays mishandled in 'omp declare target' Date: Wed, 17 Feb 2021 22:39:53 +0000 [thread overview] Message-ID: <bug-69090-4-eh9sKd8V3b@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-69090-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69090 John Donners <john.donners at atos dot net> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |john.donners at atos dot net --- Comment #7 from John Donners <john.donners at atos dot net> --- I have a similar issue, but the allocatable array is defined in a module. The array is used in a subroutine that is also DECLARE TARGET. Because the routine is DECLARE TARGET, the allocatable array must be DECLARE TARGET as well. The case works fine with target intelmicemul, but it does not work on the target nvptx-none (cuCtxSynchronize error). Test case: module b !$omp declare target (a) real, allocatable,dimension(:) :: a end module b module c use b contains subroutine d !$omp declare target a=7 end subroutine end module program arr_a use b use c implicit none allocate(a(2)) a=5 !$omp target map(tofrom:a) call d !$omp end target print*,a end
next prev parent reply other threads:[~2021-02-17 22:39 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top [not found] <bug-69090-4@http.gcc.gnu.org/bugzilla/> 2020-10-05 15:15 ` dominiq at lps dot ens.fr 2021-02-17 22:39 ` john.donners at atos dot net [this message] 2022-11-04 10:50 ` tschwinge at gcc dot gnu.org 2022-11-04 11:42 ` 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-69090-4-eh9sKd8V3b@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).