I'm using sys-devel/gcc-3.2.3-r1, and I get an ICE when compiling the following: #include <memory> int main (void) { typedef std::allocator<int> alloc1; typedef alloc1::template rebind<double> binder; } Reproducible: Always Steps to Reproduce: cat << __EOF > test.cc #include <memory> int main (void) { typedef std::allocator<int> alloc1; typedef alloc1::template rebind<double> binder; } __EOF gcc -o test test.cc Actual Results: test.cc: In function `int main()': test.cc:6: Internal compiler error in grokdeclarator, at cp/decl.c:9970 Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://bugs.gentoo.org/> for instructions. Expected Results: It should compile cleanly without errors.
An even simpler file that crashes GCC: template<typename type1> class A { public: template<typename type2> class B {}; }; typedef A<int> type3; typedef type3::template B<double> blah; Also, I've submitted this bug at the GCC bugzilla.
Closing as a cantfix as it's a gcc bug. Let's hope they can get it fixed :)
closing with latest gcc