This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/37746] string copy fails, due to changed intent(in) parameter



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]