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

kargl at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kargl at gcc dot gnu.org

--- Comment #2 from kargl at gcc dot gnu.org ---
First, the compiler should not ICE.
Second, your program likely has a bug, which is the cause of the ICE.
Third, it's not clear if the middle-end can detect the issue.
Fourth, it's clear the Fortran front-end does not catch the problem.
Finally, here's a better reduced testcase.

program fix_track_partials

  implicit none

  integer, parameter :: double = 8
  integer, parameter :: lats100 = -4000,  dlat100 = 10
  integer, parameter :: jmax = 350
  integer  i, j

  integer, parameter:: &
      latt100(jmax) = [((lats100 + dlat100 * j - dlat100/2), j=1,jmax)]

   real(double),  parameter:: latt(jmax) = [(latt100(i)/100.d0, j=1,jmax)]

   real(double), allocatable:: ys(:), ys_fixed(:)

   ys = [1]
   call move_to_nearest(ys_fixed, pnts=ys, axis=latt)

   contains

      subroutine move_to_nearest(res, pnts, axis)
         real(double), intent(out):: res(:)
         real(double), intent(in) :: pnts(:), axis(:)
      end subroutine move_to_nearest

end program fix_track_partials

Reply via email to