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

            Bug ID: 98458
           Summary: implied do-loop used in initialization with RESHAPE
                    throw ICE
           Product: gcc
           Version: 10.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: xiao....@compiler-dev.com
  Target Milestone: ---

test case: 

program test
  implicit none
  integer :: i
  integer, parameter :: t(6) = [1,2,3,4,5,6]
  integer, parameter :: tmp(6,1) = reshape([(t(i:i+1),i=1,3)],[6,1])
  print *, tmp
end

result:

    6 |   print *, tmp
      | 
internal compiler error: in gfc_conv_array_initializer, at
fortran/trans-array.c:6162

Reply via email to