For the program program array_char implicit none character (len=1) :: x x = "a" print*,[trim(x)] end program array_char
compiling on Windows XP with gfortran -v xconcat.f90 produces an ICE: Driving: gfortran -v xconcat.f90 -lgfortranbegin -lgfortran Using built-in specs. Target: i386-pc-mingw32 Configured with: ../trunk/configure --prefix=/mingw --enable-languages=c,fortran --with-gmp=/home/coudert/local --disable-nls --with-ld=/mingw/bin/ld --with-as=/mingw/bin/as --disable-werror --enable-bootstrap --enable-threads --build=i386-pc-mingw32 --disable-shared --enable-libgomp Thread model: win32 gcc version 4.3.0 20070706 (experimental) c:/programs/gfortran/bin/../libexec/gcc/i386-pc-mingw32/4.3.0/f951.exe xconcat.f90 -quiet -dumpbase xconcat.f90 -mtune=i386 -auxbase xconcat -version -fintrinsic-modules-path c:/programs/gfortran/bin/../lib/gcc/i386-pc-mingw32/4.3.0/finclude -o C:\DOCUME~1\vrao\LOCALS~1\Temp/cc8grzTr.s GNU F95 version 4.3.0 20070706 (experimental) (i386-pc-mingw32) compiled by GNU C version 4.3.0 20070706 (experimental), GMP version 4.2.1, MPFR version 2.2.1. GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096 xconcat.f90: In function 'MAIN__': xconcat.f90:4: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://gcc.gnu.org/bugs.html> for instructions. The program works if the line print*,[trim(x)] is replaced with print*,[x] or print*,trim(x) -- Summary: ICE with [trim(character_variable)] Product: gcc Version: 4.3.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: vivekrao4 at yahoo dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32703