[Bug fortran/37746] string copy fails, due to changed intent(in) parameter
kargl at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Mon Oct 6 14:48:00 GMT 2008
------- Comment #1 from kargl at gcc dot gnu dot org 2008-10-06 14:47 -------
Your code works if you fix the bug. You have two choices
program Test_StrCopy
character(len=50) :: a
character(len=51) :: b
a = "abcdefg"
call copy(a,b)
end program Test_StrCopy
or
subroutine copy(a,b)
character(len=*), intent(in) :: a
character(len=len(a)), intent(out) :: b
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37746
More information about the Gcc-bugs
mailing list