https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83039
--- Comment #3 from David Binderman <dcb314 at hotmail dot com> --- (In reply to Markus Trippelsdorf from comment #2) > Actually, I cannot reproduce the issue at all. Platform is x86_64. Reduced code is $ more bug396-min.cc template <typename b, typename c> struct g { b ad; c e; }; template <typename b, typename c> void operator<(g<b, c> h, g<b, c> j) { h.e < j.e; } class ae { public: ~ae(); }; template <typename d> struct n { void operator()(d h, d j) { h < j; } }; struct o { template <typename> using ai = ae; }; struct p { typedef p *an; }; template <typename d> struct F { d operator*(); }; struct q { bool operator==(q); p::an a; }; template <typename ax, typename ap> class r { public: typedef long az; typedef F<ap> bb; q bd(ap *, p, const ax &) const; q be(); q bf(const ax &) const; }; template <typename ax, typename ap> q r<ax, ap>::bf(const ax &h) const { p i; q a = bd(0, i, h); return a; } class s; template <typename d, typename bz = n<g<s, s>>> class t { typedef r<g<s, s>, g<g<s, s>, d>> cf; cf cg; public: d operator[](g<s, s> &h) { typename cf::bb b; cj()(h, (*b).ad); return (*b).e; } bz cj(); typename cf::az ck() { g<s, s> f; return cg.bf(f) == cg.be() ? 0 : 1; } }; struct K { struct : o::ai<int> { } cn; }; class L { K bn; }; struct u { u(int); }; class N { public: void cu(u); }; class s { public: L k; int cw(); void operator<(s &) { if (cw()) for (; cw();) ; } } typedef cx; int l, c; class v { struct w { N dd; }; t<w> dg; public: v(int); void dh() { g<cx, cx> m; dg.ck(); dg[m]; dg[m] = dg[m]; dg[m].dd.cu(l); } }; void d() { v d(c); for (;;) d.dh(); }