aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/pr81308-1.C
blob: 508372bf5e7955e31cf9c74794dde8302bbcb13c (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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
/* { dg-do compile } */
/* { dg-options "-w -O2 -fno-exceptions -std=c++11 -fpermissive" } */

namespace a {
template <typename b, b c> struct d { static constexpr b e = c; };
template <typename> struct f : d<bool, __is_trivially_copyable(int)> {};
}
typedef long g;
template <typename> struct h { static const bool e = a::f<int>::e; };
namespace a {
template <typename> struct ah;
template <typename> class ai;
}
class i {
public:
  operator[](long) const {}
};
template <typename, int> class am : public i {};
class an;
class k : public am<a::ai<an>, h<a::ai<a::ah<an>>>::e> {};
class l {
public:
  aq();
};
class ar extern as;
typedef k at;
class m {
  virtual bool av(int, unsigned &, at &, int &, g &, bool);
};
class ar {
public:
  typedef m *aw(const &, int &, const &, const &);
};
struct ax {
  static ay(ar::aw);
};
template <class az> struct n {
  n(ar) { ax::ay(ba); }
  static m *ba(const &bb, int &bc, const &bd, const &be) { az(bb, bc, bd, be); }
};
namespace {
class G : m {
  unsigned bi(const at &, l &);
  bool av(int, unsigned &, at &, int &, g &, bool);

public:
  G(const, int, const, const) {}
};
}
bool G::av(int, unsigned &, at &bl, int &, g &, bool) {
  l bo;
  bi(bl, bo);
}
o() { n<G> bp(as); }
namespace {
enum { bq, br };
}
unsigned G::bi(const at &bl, l &bo) {
  unsigned bs;
  for (char *j;; j += 2)
    switch (*j) {
    case bq:
      bl[bs];
    case br:
      bo.aq();
    }
}