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/26257] internal compiler error: Segmentation fault, on function call with assumed shape array parameter



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


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