http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52329
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-02-21 18:24:37 UTC --- Slightly more reduced testcase for -O2 -g: template <typename> class A; template <class> struct B; template <typename T, typename = B <T>, typename = A <T> > class C; template <typename _Tp> class A {}; template <typename T, typename, typename U> struct D { struct E { T *e1 () {} void e2 (U a) { e3 (a); } void e3 (U) throw (); }; struct F { F (T *, U) {} }; F f; E *d1 () {} static E & d2 () {} D () : f (d2 ().e1 (), U ()) { d1 ()->e2 (this->d3 ()); } U d3 () {} }; template <typename, typename> struct G { virtual ~G () {} }; template <typename T, typename U> struct H { void h1 (G <T, U> *); }; template <typename T, typename U> struct I : H <T, U> { I () { this->h1 (0); } }; template <typename T, typename U, typename V> struct J : G <T, U> { D <T, U, V> j; }; template <typename T, typename U, typename V> struct C : I <T, U> { J <T, U, V> c; }; struct K; template <typename T, class U> I <T, U> & operator <<(I <T, U> &, const K &) { C <U> s; } template I <wchar_t, B <wchar_t> > & operator <<(I <wchar_t, B <wchar_t> >&, const K &);