aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/pr90462.C
blob: 2585ba0dcdba69b67b60ee2c496863435ce9060d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/* { dg-options "-Wdeprecated-copy -fdiagnostics-format=json" } */

template <class> class b;
struct B {
  typedef b<char> *c;
};
class d {
public:
  B::c operator->();
};
template <class> struct e;
class f {
  typedef int g;
};
template <class, class> class h;
template <class i> class b {
public:
  i j;
  i k;
  int l;
  void assign() {
    int m;
    h<i, int> n(&m);
    n.o(&j, &k, l);
  }
};
template <class i, class> class s : f { s &p(const i *, const i *, g); };
template <class i, class t> s<i, t> &s<i, t>::p(const i *, const i *, g) {
  d q;
  q->assign();
}
struct G {
  G();
  G(int);
  G(G &);
};
template <class i, class> class h {
public:
  h(int *);
  void o(const i *, const i *, unsigned);
  i r();
};
template <class i, class t> void h<i, t>::o(const i *, const i *, unsigned) {
  G a;
  a = r();
}
template s<char, e<char>> &s<char, e<char>>::p(const char *, const char *, g);

/* { dg-regexp ".*" } */