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

Reply via email to