Compiling this program takes a very long time with GCC 4.x compared with GCC 3.3. GCC 3.4 fails to compile it, which has already been reported as PR18462.
Compile times for current mainline, GCC 4.0 and GCC 3.3 on a 500 MHz Pentium III with 512 MB RAM: [EMAIL PROTECTED] cgx]$ time g++-cvs -O3 -c CheckersGameX.ii real 0m41.298s user 0m39.016s sys 0m0.958s [EMAIL PROTECTED] cgx]$ g++-cvs -v Using built-in specs. Target: i686-pc-linux-gnu Configured with: ../gcc-cvs/configure --program-suffix=-cvs --enable-threads=posix --enable-languages=c,c++ --enable-__cxa_atexit --prefix=/home/petur/opt/gcc-cvs --disable-checking Thread model: posix gcc version 4.1.0 20050430 (experimental) [EMAIL PROTECTED] cgx]$ time g++400 -O3 -c CheckersGameX.ii real 0m43.372s user 0m39.739s sys 0m0.966s [EMAIL PROTECTED] cgx]$ g++400 -v Using built-in specs. Target: i686-pc-linux-gnu Configured with: ../gcc-4.0.0/configure --program-suffix=400 --enable-version-specific-runtime-libs --enable-threads=posix --enable-languages=c,c++,java --enable-__cxa_atexit Thread model: posix gcc version 4.0.0 [EMAIL PROTECTED] cgx]$ time g++335 -O3 -c CheckersGameX.ii real 0m0.115s user 0m0.051s sys 0m0.018s [EMAIL PROTECTED] cgx]$ g++335 -v Reading specs from /usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.3.5/specs Configured with: ../gcc-3.3.5/configure --program-suffix=335 --enable-threads=posix --enable-version-specific-runtime-libs --enable-languages=c,c++ Thread model: posix gcc version 3.3.5 -- Summary: [4.0/4.1 Regression] Very high compile time Product: gcc Version: 4.0.0 Status: UNCONFIRMED Severity: normal Priority: P2 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: peturrun at internet dot is CC: gcc-bugs at gcc dot gnu dot org GCC build triplet: i686-pc-linux-gnu GCC host triplet: i686-pc-linux-gnu GCC target triplet: i686-pc-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21308