// PR target/119834 // { dg-do compile { target c++11 } } // { dg-options "-O2 -march=z900" } int *a; struct A; struct B { A begin (); A end (); operator bool * (); void operator++ (); }; template auto operator| (int, T x) -> decltype (x (0)); struct A : B { bool a; }; struct C { A operator () (int); }; enum D {} d; int e; void foo (); struct E { template T *garply () { if (d) return 0; if (e) foo (); return reinterpret_cast (f); } template void bar (long x, bool) { if (&g - f) __builtin_memset (a, 0, x); f += x; } template T *baz (T *x, long y, bool z = true) { if (d) return nullptr; bar ((char *)x + y - f, z); return x; } template void qux (T x) { baz (x, x->j); } char *f, g; } *h; struct F { template int corge (T x) { x.freddy (this); return 0; } template int boo (T x) { corge (x); return 0; } } i; template struct G { template friend T operator+ (U, G); template void waldo (F *x, G y, U z) { x->boo (z + y); } template void plugh (E *y, Ts... z) { T *x = y->garply (); x->thud (y, z...); } }; template using H = G; struct I { static constexpr unsigned j = 2; void thud (E *x, A y) { x->qux (this); for (auto g : y) ; } }; H k; struct J { void freddy (F *) { C a; auto b = 0 | a; k.plugh (h, b); } }; H l; struct K { void freddy () { l.waldo (&i, l, this); } }; void grault () { K m; m.freddy (); }