This looks a lot like PR18023, but with WRITE instead of PRINT, and the ICE is different from PR18476.
$ gfortran -v Reading specs from /home/ig25/lib/gcc/i686-pc-linux-gnu/4.0.0/specs Configured with: ../gcc/configure --prefix=/home/ig25 --enable-languages=c,c++,f95 : (reconfigured) ../gcc/configure --prefix=/home/ig25 --with-gcc-version-trigger=/home/ig25/gcc/gcc/version.c --enable-languages=c,c++,f95 --no-create --no-recursion Thread model: posix gcc version 4.0.0 20041114 (experimental) $ cat format-int.f90 program internal integer k character(len=80) chr read(chr,k) end program internal $ gfortran format-int.f90 format-int.f90: In function 'MAIN__': format-int.f90:4: internal compiler error: in gfc_add_modify_expr, at fortran/trans.c:154 Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://gcc.gnu.org/bugs.html> for instructions. -- Summary: ICE with integer variable "format" Product: gcc Version: 4.0.0 Status: UNCONFIRMED Severity: normal Priority: P2 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: Thomas dot Koenig at online dot de CC: gcc-bugs at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18481