The following is a regression observed with build == host == i686-pc-mingw32 and target == x86_64-pc-mingw32, built from mainline sources. It used to pass with a build dated 2007-11-30.
$ cat Codelet.f90 program test integer, parameter :: wp = 4 complex(wp), parameter :: i = (0._wp, 1._wp) complex(wp) :: c(12) integer :: m, N N = 12 c = (/(exp(i*m),m=1,N)/) print *, c(1) end $ x86_64-pc-mingw32-gfortran Codelet.f90 -O2 -c Codelet.f90: In function 'test': Codelet.f90:9: error: invalid rtl sharing found in the insn (insn 155 154 156 2 Codelet.f90:8 (set (subreg:DI (reg:SC 108) 0) (reg:DI 154)) -1 (nil)) Codelet.f90:9: error: shared rtx (subreg:DI (reg:SC 108) 0) Codelet.f90:9: internal compiler error: internal consistency failure $ x86_64-pc-mingw32-gfortran -v Using built-in specs. Target: x86_64-pc-mingw32 Configured with: ../../trunk/configure --prefix=/home/FX/irun64 --build=i586-pc-mingw32 --target=x86_64-pc-mingw32 --with-gmp=/home/FX/local --enable-languages=c,fortran --disable-werror --disable-nls --enable-threads Thread model: win32 gcc version 4.4.0 20080421 (experimental) [trunk revision 134506] (GCC) -- Summary: [4.4 regression] invalid rtl with -O2 Product: gcc Version: 4.4.0 Status: UNCONFIRMED Keywords: ice-on-valid-code Severity: normal Priority: P3 Component: tree-optimization AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: fxcoudert at gcc dot gnu dot org GCC build triplet: i686-pc-mingw32 GCC host triplet: i686-pc-mingw32 GCC target triplet: x86_64-pc-mingw32 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36006