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

            Bug ID: 95550
           Summary: [OpenACC] ICE in expand_oacc_for, at omp-expand.c:6075
           Product: gcc
           Version: 10.0
            Status: UNCONFIRMED
          Keywords: openacc
          Severity: normal
          Priority: P3
         Component: middle-end
          Assignee: unassigned at gcc dot gnu.org
          Reporter: burnus at gcc dot gnu.org
  Target Milestone: ---

The following program gives an ICE with -fopenacc:

   12 |     !$acc loop private(A)
      | 
internal compiler error: in expand_oacc_for, at omp-expand.c:6075
0x6b9638 expand_oacc_for
        ../../repos/gcc-cs-og10-pre/gcc/omp-expand.c:6075
0xd6eadf expand_omp_for
        ../../repos/gcc-cs-og10-pre/gcc/omp-expand.c:6583
0xd6f5ea expand_omp
        ../../repos/gcc-cs-og10-pre/gcc/omp-expand.c:8912



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

  A = [(3*j, j=1, 10)]

  !$acc parallel create(A)
    A(:) = [(-2*i, i = 1, size(A))]
    !$acc loop private(A)
    do i = 1, 10
      A(i) = 9*i
    end do
    !if (any (A /= [(-2*i, i = 1, 10)])) error stop 2
  !$acc end parallel
end

Reply via email to