Compiling some of the LAPACK source code under -O1 or greater with the 64 bit version of GNU Fortran 4.4.0 fails badly (whereas its peer 32 bit build does not exhibit the problem).
The Windows build of gfortran is current from <http://gcc.gnu.org/wiki/GFortranBinaries> as of Sep 6, 2008: <http://quatramaran.ens.fr/~coudert/gfortran/gfortran-win64.zip> 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) Similar problems occur with numerous .f source files dealing with COMPLEX versions of routines, the list of offending files within the current 3.1.1 version of LAPACK is provided later, one of them is chdet2.f: Fine at optimization level 0 : G:\lapack\SRC>gfortran -c -O0 chetd2.f Things get weird here: G:\lapack\SRC>gfortran -c -O1 chetd2.f chetd2.f: In function 'chetd2': chetd2.f:254: internal compiler error: in reg_overlap_mentioned_p, at rtlanal.c:1398 Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. G:\lapack\SRC>gfortran -c -O2 chetd2.f chetd2.f: In function 'chetd2': chetd2.f:254: error: invalid rtl sharing found in the insn (insn 688 687 689 14 chetd2.f:190 (set (subreg:DI (reg:SC 191) 0) (reg:DI 427)) -1 (nil)) chetd2.f:254: error: shared rtx (subreg:DI (reg:SC 191) 0) chetd2.f:254: internal compiler error: internal consistency failure Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. The list of files that trigger similar problems in LAPACK 3.1.1 is provided below, with the ancilliary TIMING utilities folder located at the same level as SRC (none of the TESTING files seem to disturb the compiler): \SRC\cgbcon.f \SRC\chetd2.f \SRC\chetri.f \SRC\chgeqz.f \SRC\chpgst.f \SRC\chptrd.f \SRC\chptri.f \SRC\claein.f \SRC\claesy.f \SRC\clahqr.f \SRC\claic1.f \SRC\clapll.f \SRC\claqr0.f \SRC\claqr4.f \SRC\clarfg.f \SRC\clarnv.f \SRC\clatbs.f \SRC\clatdf.f \SRC\clatps.f \SRC\clatrd.f \SRC\clatrs.f \SRC\clauu2.f \SRC\cpotf2.f \SRC\cpptrf.f \SRC\cpptri.f \SRC\csptri.f \SRC\csytri.f \SRC\ctgevc.f \SRC\ctgsna.f \SRC\ctrsna.f \SRC\ctrsyl.f \TIMING\EIG\clatm4.f \TIMING\EIG\ctim26.f \TIMING\EIG\ctim51.f \TIMING\EIG\ceispack.f \TIMING\EIG\EIGSRC\chgeqz.f \TIMING\EIG\EIGSRC\claein.f \TIMING\EIG\EIGSRC\clahqr.f \TIMING\EIG\EIGSRC\clarrv.f \TIMING\EIG\EIGSRC\ctgevc.f \TIMING\LIN\ctimmg.f \TIMING\LIN\clinpk.f \TIMING\LIN\LINSRC\claic1.f -- Summary: ICE when compiling some LAPACK files with optimizations Product: gcc Version: 4.4.0 Status: UNCONFIRMED Severity: major Priority: P3 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: jean-louis dot dornstetter at wanadoo dot fr GCC build triplet: i586-pc-mingw32 GCC host triplet: x86_64-pc-mingw32 GCC target triplet: x86_64-pc-mingw32 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37401