The attached code takes 1m29s to compile on my machine with 4.2.0 in 64-bit mode, and takes 0.5s on 4.0.3
Using built-in specs. Target: x86_64-suse-linux Configured with: ../../gcc-4.2.0/configure --enable-languages=c,c++,fortran --prefix=/usr/local/products/gcc/4.2.0-pa-64 --with-gnu-as --with-as=/usr/local/products/gcc/binutils-2.17-64/bin/as --with-gnu-ld --with-ld=/usr/local/products/gcc/binutils-2.17-64/bin/ld --enable-threads=posix --enable-shared --enable-__cxa_atexit --with-gmp=/usr/local/products/gcc/gmp-4.2-64 --with-mpfr=/usr/local/products/gcc/mpfr-2.2.1-64 --enable-libstdcxx-allocator=pool x86_64-suse-linux Thread model: posix gcc version 4.2.0 monsterd09:/work/nova/2300> time /usr/local/products/gcc/4.2.0-pa-64/bin/g++ -O0 -I/work/nova/sts5/beta/src -I/work/ren/ren/src -I/work/ren/ren.ext/src -D_LARGEFILE64_SOURCE -ftemplate-depth-64 -pedantic-errors -Wall -Wno-unknown-pragmas -W -Woverloaded-virtual -fno-strict-aliasing -fsigned-char -Wno-long-long test_fixedpoint_case.C real 1m29.184s user 1m28.338s sys 0m0.204s -- Summary: Very high compile times for template code Product: gcc Version: 4.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: georgeh at rentec dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32350