NAG f95:
Error: bar.f90, line 6: Array supplied for dummy IN (no. 1) of COPY too small
g95:
Error: Array argument at (1) is smaller than the dummy size
gfortran: No error/warning.

--------------------------
program main
implicit none
character :: digit_arr(10)
call copy(digit_arr)
contains
  subroutine copy(in)
    character, dimension(11) :: in, out
  end subroutine copy
end program main
--------------------------

Note: The other way round is ok, i.e. actual = 1:10, dummy = 1:8


-- 
           Summary: Report if dummy array sizes is larger than actual array
                    size
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Keywords: diagnostic
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: burnus at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30939

Reply via email to