This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/26257] internal compiler error: Segmentation fault, on function call with assumed shape array parameter
- From: "pault at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 13 Feb 2006 22:17:34 -0000
- Subject: [Bug fortran/26257] internal compiler error: Segmentation fault, on function call with assumed shape array parameter
- References: <bug-26257-11277@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from pault at gcc dot gnu dot org 2006-02-13 22:17 -------
This is a module related problem; the same function works fine when internal.
program TestStringTools
character(len=50) :: txt
character(len=1), dimension(50) :: chararr
txt = chararray2string(chararr)
contains
function chararray2string(chararray) result(text)
character(len=1), dimension(:) :: chararray ! input
character(len=size(chararray)) :: text ! output
do i = 1,size(chararray,1)
text(i:i) = chararray (i)
end do
end function chararray2string
end program TestStringTools
Paul
--
pault at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |pault at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26257