/* { dg-options "-Wdeprecated-copy -fdiagnostics-format=json" } */ template class b; struct B { typedef b *c; }; class d { public: B::c operator->(); }; template struct e; class f { typedef int g; }; template class h; template class b { public: i j; i k; int l; void assign() { int m; h n(&m); n.o(&j, &k, l); } }; template class s : f { s &p(const i *, const i *, g); }; template s &s::p(const i *, const i *, g) { d q; q->assign(); } struct G { G(); G(int); G(G &); }; template class h { public: h(int *); void o(const i *, const i *, unsigned); i r(); }; template void h::o(const i *, const i *, unsigned) { G a; a = r(); } template s> &s>::p(const char *, const char *, g); /* { dg-regexp ".*" } */