public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/95551] New: [OpenMP, OpenACC] -fopenmp/-fopenacc also with -foffload=disable fails with: (.gnu.offload_vars+0x0): undefined reference to `A.10.2'
@ 2020-06-05 10:06 burnus at gcc dot gnu.org
  2020-06-05 10:09 ` [Bug middle-end/95551] " burnus at gcc dot gnu.org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: burnus at gcc dot gnu.org @ 2020-06-05 10:06 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 95551
           Summary: [OpenMP, OpenACC] -fopenmp/-fopenacc also with
                    -foffload=disable fails with: (.gnu.offload_vars+0x0):
                    undefined reference to `A.10.2'
           Product: gcc
           Version: 10.0
            Status: UNCONFIRMED
          Keywords: openacc, openmp, wrong-code
          Severity: normal
          Priority: P3
         Component: middle-end
          Assignee: unassigned at gcc dot gnu.org
          Reporter: burnus at gcc dot gnu.org
  Target Milestone: ---

Loosely related to PR 95550 (for a variant of this test case, which fails with
an ICE).

The following test case fails to compile with -fopenmp or -fopenacc with:
   (.gnu.offload_vars+0x0): undefined reference to `A.10.2'
at least when offloading to AMDGCN (for nvidia, one runs into PR 65181) and
also with "-foffload=disable -O3".

Note: In order to reproduce this issue, an offloading compiler has to be
configured (configure-time set ENABLE_OFFLOADING has to evaluate to true) as
otherwise no .gnu.offload_vars is generated.


program main
  implicit none (type, external)
  integer :: j
  integer, allocatable :: A(:)

  A = [(3*j, j=1, 10)]
  call bar (A)
  deallocate (A)
contains
  subroutine bar (array)
    integer :: i
    integer :: array(:)

    !$omp target map(from:array)
    !$acc parallel copyout(array)
    array = [(-2*i, i = 1, size(array))]
    !$omp do private(array)
    !$acc loop gang private(array)
    do i = 1, 10
      array(i) = 9*i
    end do
    if (any (array /= [(-2*i, i = 1, 10)])) error stop 2
    !$omp end target
    !$acc end parallel
  end subroutine bar
end

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2020-06-15  9:11 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-05 10:06 [Bug middle-end/95551] New: [OpenMP, OpenACC] -fopenmp/-fopenacc also with -foffload=disable fails with: (.gnu.offload_vars+0x0): undefined reference to `A.10.2' burnus at gcc dot gnu.org
2020-06-05 10:09 ` [Bug middle-end/95551] " burnus at gcc dot gnu.org
2020-06-05 13:50 ` burnus at gcc dot gnu.org
2020-06-05 14:33 ` jakub at gcc dot gnu.org
2020-06-08 10:50 ` burnus at gcc dot gnu.org
2020-06-08 21:25 ` cvs-commit at gcc dot gnu.org
2020-06-15  9:07 ` cvs-commit at gcc dot gnu.org
2020-06-15  9:11 ` burnus at gcc dot gnu.org
2020-06-15  9:11 ` burnus at gcc dot gnu.org

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).