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

            Bug ID: 89969
           Summary: [OPENACC] private clause does not work with fortran
                    automatic array
           Product: gcc
           Version: 8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: abidh at codesourcery dot com
  Target Milestone: ---

Please look at the test case below. It uses an automatic array in private
clause. With -fopenacc and ptx offloading, the resultant executable crashes at
run time with the following error:
libgomp: cuStreamSynchronize error: an illegal memory access was encountered

subroutine crash1(ngas)
  implicit none
  integer, intent(in ) :: ngas
  integer, dimension(ngas) :: automatic_array
  integer  :: ilay

  !$acc parallel loop private(automatic_array) 
  do ilay = 1 , ngas
    automatic_array(ilay) = ilay
  end do

end subroutine crash1

program main
  implicit none

  integer :: ngas = 10
  call crash1(ngas)
end program main

Reply via email to