gcc 3.4.3 (and also 3.4.4) segfault on x86_64; segfault doesn't occur on a i686 using gcc 3.3.4. Please contact me if you need any further detail.
$ gcc -v -save-temps main.cpp Reading specs from /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.3/specs Configured with: /var/tmp/portage/gcc-3.4.3-r1/work/gcc-3.4.3/configure --enable-version-specific-runtime-libs --prefix=/usr --bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/3.4.3 --includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.3/include --datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/3.4.3 --mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/3.4.3/man --infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/3.4.3/info --with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.3/include/g++-v3 --host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --disable-altivec --enable-nls --without-included-gettext --with-system-zlib --disable-checking --disable-werror --disable-libunwind-exceptions --enable-multilib --enable-java-awt=gtk --enable-languages=c,c++,java --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu Thread model: posix gcc version 3.4.3 20041125 (Gentoo 3.4.3-r1, pie-8.7.7) /usr/libexec/gcc/x86_64-pc-linux-gnu/3.4.3/cc1plus -E -quiet -v -D_GNU_SOURCE main.cpp -mtune=k8 -o main.ii #include "..." search starts here: #include <...> search starts here: /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.3/include/g++-v3 /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.3/include/g++-v3/x86_64-pc-linux-gnu /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.3/include/g++-v3/backward /usr/local/include /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.3/include /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.3/../../../../x86_64-pc-linux-gnu/include /usr/include End of search list. /usr/libexec/gcc/x86_64-pc-linux-gnu/3.4.3/cc1plus -fpreprocessed main.ii -quiet -dumpbase main.cpp -mtune=k8 -auxbase main -version -o main.s GNU C++ version 3.4.3 20041125 (Gentoo 3.4.3-r1, pie-8.7.7) (x86_64-pc-linux-gnu) compiled by GNU C version 3.4.3 20041125 (Gentoo 3.4.3-r1, pie-8.7.7). GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 main.cpp: In member function `void A::foo()': main.cpp:4: internal compiler error: Segmentation fault $ cat main.ii # 1 "main.cpp" # 1 "<built-in>" # 1 "<command line>" # 1 "main.cpp" class A { typedef void T; void foo(){ foo(typename A::T()); } }; $ gcc -save-temps main2.cpp main2.cpp: In member function `void A::foo()': main2.cpp:4: error: invalid use of void expression $ cat main2.ii # 1 "main2.cpp" # 1 "<built-in>" # 1 "<command line>" # 1 "main2.cpp" class A { typedef void T; void foo(){ foo(A::T()); } }; -- Summary: compiler segfaults on typename Product: gcc Version: 3.4.3 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: julian dot rueth at informatik dot uni-ulm dot de http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26343