$ cat > a.cc template <typename T> T make_smth(void); template <typename T1, typename T2> struct struct1 { typeof(make_smth<T2>()(*make_smth<T1>())) operator*() {} }; struct struct2 { template <typename T> typeof(T::first) operator()(T t) const { return t.first; } }; struct data { int first; }; void g(void) { *struct1<data*, struct2>(); } $ g++ a.cc a.cc: In member function `__typeof (T::first) struct2::operator()(T) const [with T = data]': a.cc:6: instantiated from `struct1<data*, struct2>' a.cc:16: instantiated from here a.cc:12: Internal compiler error in convert_for_assignment, at cp/typeck.c:6169
$ g++-3.3 test.cc test.cc: In member function `__typeof (T::first) struct2::operator()(T) const [with T = data]': test.cc:6: instantiated from `struct1<data*, struct2>' test.cc:16: instantiated from here test.cc:12: internal compiler error: in convert_for_assignment, at cp/typeck.c:5917
fixed in gcc3.4