// PR tree-optimization/92262 // { dg-do compile { target c++11 } } // { dg-options "-O2 -ftree-loop-distribution -g" } struct A; struct B { template using b = T *; }; template using c = B::b; void *operator new (__SIZE_TYPE__, void *p) { return p; } struct C { template void foo (T *x, U... y) { new (x) T(y...); } }; template class D : public C {}; template struct E; template struct E> { using e = D; template using f = D; template static void bar (e x, U y, V... z) { x.foo (y, z...); } }; template struct F : E { template struct G { typedef typename E::template f O; }; }; template void baz (T x, U y, V z) { F::bar (z, y, *x); } struct H { typedef c I; typedef c J; I i; J j; void qux (J x) { j = x; } }; template struct K { K(D x) : k (x) {} typedef H::J L; struct M { L m; H n, o; }; struct N : F>::G::O, M { N (F::G::O); }; void quux (); N k; }; template void K::quux () { L K (k.m - 1); k.n.qux (K); } template struct P : K { template P (T x, T, D y = D ()) : K (y) { corge (x); } template void corge (T); typedef L L; }; template template void P::corge (V y) { quux (); for (L x = k.n.j; x < k.o.j; ++x) { ++y; D pv; baz (y, *x, pv); } D z; baz (y, k.o.i, z); } struct A { A (int x) : a (x) {} int a; }; int a[2]{}; int main () { P (a, a); return 0; }