------- Comment #2 from burnus at gcc dot gnu dot org 2007-04-19 16:16 -------
Analogously for character lengths:
program test
character(len=10) :: x
call foo(x)
write(*,*) 'X=',x
contains
subroutine foo(y)
character(len=20) :: y
y = 'hello world'
end subroutine
end
Taken from: http://ftp.aset.psu.edu/pub/ger/fortran/test/ test17.f90 (slightly
modified).
g95: Actual character argument at (1) is shorter in length than the formal
argument
NAG f95: Character length too short for arg Y (no. 1) of FOO
ifort: Character length argument mismatch. [X]
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25071