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

            Bug ID: 83683
           Summary: eoshift accepts wrong-length boundary
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: tkoenig at gcc dot gnu.org
  Target Milestone: ---

The following should be rejected:

program main
  implicit none
  integer :: i
  character(len=3) :: e(2,3,4)

  e = reshape([(repeat(achar(i),3),i=iachar('a'),iachar('a')+2*3*4-1)], 
shape(e))
  print *,eoshift(e,1,boundary="1")

end program main

From the F2003 standard 13.7.52:

"BOUNDARY (optional) shall be of the same type and type parameters as ARRAY"

Reply via email to