From Bugzilla Helper: User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20020823 Netscape/7.0 Description of problem: icall.cpp: In function `void SicVal(const T&)': icall.cpp:26: internal compiler error: in cp_tree_equal, at cp/tree.c:1627 I've reduced the code to the following test case: struct TfTraits { template <bool B> struct BoolType { static const bool value = false; }; template <class T> static T &Hypothetical(); }; struct Sic_Traits { template <class T, bool B> struct _Type { }; }; template <class T, bool B> class Sic_TypedValHelper { public: Sic_TypedValHelper(const T &t) : _data(t) { } private: T _data; }; template <class T> void SicVal(const T& t) { typedef typename Sic_Traits::_Type<T, TfTraits::BoolType<(sizeof(foo(TfTraits::Hypothetical<T*>())) == sizeof(TfTraits::BoolType<true>))>::value> TypeTraits; new Sic_TypedValHelper<T, !TfTraits::BoolType<(sizeof(foo(TfTraits::Hypothetical<T*>())) == sizeof(TfTraits::BoolType<true>))>::value>(t); } Version-Release number of selected component (if applicable): gcc-3.4.1-1 How reproducible: Always Steps to Reproduce: 1. Place the above source code in icall.cpp 2. gcc -c icall.cpp Actual Results: icall.cpp: In function `void SicVal(const T&)': icall.cpp:26: internal compiler error: in cp_tree_equal, at cp/tree.c:1627 Expected Results: The code should compile. Additional info: This works fine with gcc 3.2 and gcc 3.3.
Moved upstream, http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17826