template<class _T2> struct X { template<class _U2> X(_U2 __y){} };
template <class T> class Y{}; template<> class Y<void> { typedef enum {} Z; Y():z(), x(z) {} Z z; X<Z> x; }; g++-4.3.0 -c test.cpp test.cpp: In constructor 'Y<void>::Y()': test.cpp:10: internal compiler error: Segmentation fault if "typedef enum {} Z;" is replaced by "enum Z {}", it compiles fine. gcc-4.2.2 and 4.1.2 compile without problems -- Summary: ICE in template specialization using a typedef to an anonymous enum Product: gcc Version: 4.3.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: rbuergel at web dot de http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34541