Compiling the following code on Windows causes an ICE: program xx implicit none write (*,*) tf_char((/.true./),"#") contains elemental function tf_char(tf,char_true) result(cc) logical , intent(in) :: tf character (len=*), intent(in) :: char_true character (len=len(char_true)) :: cc ! works if line above replaced with line below ! character (len=1) :: cc cc = "" end function tf_char end program xx gfortran -v -c -Wall -std=f95 --free-form xx_elem_bug.f Using built-in specs. Configured with: ../gcc/configure --prefix=/mingw --enable-languages=c,f95 Thread model: win32 gcc version 4.0.0 20050120 (experimental) c:/programs/gfortran/bin/../libexec/gcc/i686-pc-mingw32/4.0.0/f951.exe xx_elem_bug.f -quiet -dumpbase xx_elem_bug.f -mtune=pentiumpro -auxbase xx_elem_bug -Wall -std=f95 -version -ffree-form -o C:\DOCUME~1\rao\LOCALS~1 \Temp/ccw5aaaa.s GNU F95 version 4.0.0 20050120 (experimental) (i686-pc-mingw32) compiled by GNU C version 4.0.0 20050117 (experimental). GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096 xx_elem_bug.f: In function 'tf_char': xx_elem_bug.f:3: warning: unused variable 'tf' xx_elem_bug.f: In function 'MAIN__': xx_elem_bug.f:3: internal compiler error: in gfc_conv_function_call, at fortran/trans-expr.c:1104 Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://gcc.gnu.org/bugs.html> for instructions.
*** This bug has been marked as a duplicate of 19242 ***