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

            Bug ID: 77665
           Summary: ICE in expand_GOMP_SIMD_VF, at internal-fn.c:172
           Product: gcc
           Version: 7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gerhard.steinmetz.fort...@t-online.de
  Target Milestone: ---

Affects versions 5, 6, 7 at optimization level -Os, -O1 or higher.


$ cat z1.f90
program p
   type t
      integer :: a = 0
   end type
   type(t) :: x
   integer :: i
   !$omp declare reduction (+:t: omp_out%a = omp_out%a + omp_in%a)
   !$omp simd reduction(+:x)
   do i = 1, 8
!     if ( abs(i) > 5 )  stop  ! or "call abort" etc.
      if ( abs(i) < 5 )  stop
!     if ( abs(i) <= 5 ) stop
!     if ( abs(i) /= 5 ) stop
      x%a = x%a + 1
   end do
   print *, x%a
end


$ gfortran-7-20160918 -O2 -fopenmp z1.f90
z1.f90:17:0:

 end

internal compiler error: in expand_GOMP_SIMD_VF, at internal-fn.c:172
0xa152a7 expand_GOMP_SIMD_VF
        ../../gcc/internal-fn.c:172
0x80348f expand_call_stmt
        ../../gcc/cfgexpand.c:2578
0x80348f expand_gimple_stmt_1
        ../../gcc/cfgexpand.c:3579
0x80348f expand_gimple_stmt
        ../../gcc/cfgexpand.c:3745
0x8050ce expand_gimple_basic_block
        ../../gcc/cfgexpand.c:5752
0x80b276 execute
        ../../gcc/cfgexpand.c:6363

Reply via email to