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

--- Comment #1 from Thomas Koenig <tkoenig at gcc dot gnu.org> ---
Another thing that is incorrectly accepted, also with
-fcheck=bounds:

program main
  implicit none
  integer :: n
  integer :: i,n1, n2, n3
  character(len=3), parameter :: e(2,3,4) =
reshape([(repeat(achar(i),3),i=iachar('a'),iachar('a')+2*3*4-1)], &
       shape(e))
  character(len=3), parameter :: bnd2(3,5) =
reshape([(repeat(achar(i),3),i=iachar('A'),iachar('A')+3*5-1)], &
       shape(bnd2))
  character(len=3) :: f2(2,3,4) ! = eoshift(e,shift=-1,boundary=bnd2);

  n = -1
  f2 = eoshift(e,shift=n,boundary=bnd2);  ! bnd2 has wrong bounds

  print '(*(1H",A,1H",:","))',f2
end program main

Reply via email to