https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93226

--- Comment #8 from Sebastian Galindo <sebastian.galindo143 at gmail dot com> 
---
(In reply to Sebastian Galindo from comment #7)

Actually, I got a little bit confused running some tests, the OpenACC spec
suggests that the device resident clause could be used with variables declared
in the program. But even without the fix mentioned before, in OG15 the compiler
do not allocate the variable in the device.

I tested this by writing a simple script as follows: 

program device_resident_alloc_ptr_runtime
  ...
  integer, parameter :: N = 8
  integer :: a(N)
  !$acc declare device_resident(a)
  ...

  nbytes = int(size(a, kind=8), c_size_t) * int(c_sizeof(a(1)), c_size_t)
  present_a = acc_is_present(a(1), nbytes)
  if (.not. present_a) stop 1
  ...

Am I missing something? Am I checking the presence correctly? Is this the
expected behavior?

Reply via email to