------- Additional Comments From tkoenig at gcc dot gnu dot org 2005-09-18 19:56 ------- Not fixed on 4.0:
$ cat > clen.f90 program main implicit none character(len=2) :: a a = 'xy' print *,fun(a) contains function fun(arg) character(len=*) :: arg character(len=len(arg)) :: fun fun = 'xx' end function fun end program main $ gfortran clen.f90 clen.f90: In function 'MAIN__': clen.f90:5: internal compiler error: in gfc_conv_function_call, at fortran/trans-expr.c:1108 Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://gcc.gnu.org/bugs.html> for instructions. $ gfortran -v Using built-in specs. Target: i686-pc-linux-gnu Configured with: ../gcc-4.0/configure --prefix=/home/ig25 --enable-languages=c,fortran Thread model: posix gcc version 4.0.2 20050917 (prerelease) -- What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Known to fail| |4.0.2 Known to work| |4.1.0 Resolution|FIXED | Summary|ICE in |[4.0 only] ICE in |gfc_conv_function_call for |gfc_conv_function_call for |character function with |character function with |LEN=length(arg) |LEN=length(arg) http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22518