summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/pr91173.C
blob: b8fb41ba0cdce7076dde298f24ef756327106c54 (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
class a {
  int b;
  void *c;

public:
  bool aa();
  int &ab() {
    if (aa()) {
      void *d(c);
      return static_cast<int *>(d)[b];
    }
    return *(int *)0;
  }
};
typedef enum {E} e;
class f : public a {
  int g;

public:
  int ac() {
    if (g)
      return 1;
    return ac();
  }
};
int *ad;
struct h {
  static int ae(e, int *m) {
    f ag;
    int *ah;
    while (!0) {
      ad = &ag.ab();
      ah = ad + ag.ac();
      while (ad < ah)
        *m = *ad++;
    }
  }
};
template <class, class>
void i(int *, int *, int, int *, e n, int *o) {
  h::ae(n, o);
}
int aq, ar, as, at, au;
void aw() { i<int, bool>(&aq, &ar, as, &at, (e)0, &au); }