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

--- Comment #2 from Tobias Burnus <burnus at gcc dot gnu.org> ---
The reason for the nvptx dependency is the following.

omp_max_simt_vf (void)
{
  if (!optimize)
    return 0;
  if (ENABLE_OFFLOADING)
    for (const char *c = getenv ("OFFLOAD_TARGET_NAMES"); c;)
      {
        if (startswith (c, "nvptx"))
          return 32;
...
  return 0;
}

 * * *

Reduced testcase:

module m
  implicit none (external, type)
  integer :: ll
  !$omp declare target (ll)
contains
subroutine foo (i1)
  !$omp declare target (foo)
  logical :: i1
  integer :: i
  !$omp distribute simd if(i1)
  do i = 1, 64
    ll = ll +1
  end do
end
end module

Reply via email to