// PR debug/52048 // { dg-do compile } // { dg-options "-fcompare-debug -fnon-call-exceptions -fno-tree-dominator-opts -O2" } template struct A; template struct A { typedef T &a; }; template struct B { typedef typename A ::a a; a operator *() {} }; template bool operator != (B , B ) { } template struct C { typedef T *c; template struct D { typedef C d; }; }; template struct E { typedef typename U::template D ::d e; }; template > struct F { typedef E b; typedef typename b::e e; typedef typename e::c c; typedef B i; i begin (); i end (); }; class G; class H; struct I { void *i; template T foo (); }; struct J : public I { virtual bool bar (); }; class K {}; struct L { bool baz () {} }; struct M { K m1 (K); K m2 (H *) {} }; struct N : J { bool bar (G &); }; bool N::bar (G &) { M m = foo (); F f; for (F ::i I = f.begin (), E = f.end (); I != E;) { H *h = *I; L l; if (l.baz ()) m.m1 (m.m2 (h)); } }