summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/torture/pr64565.C
blob: 42b0239c525b6709de0b62a62d0982ad46a5f9c8 (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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
/* { dg-do compile } */
typedef enum
{
  NS_OK
} nsresult;
struct A
{
  static int kIID;
};
class B
{
};
class C
{
public:
  C (B p1) { m_fn1 (p1, A::kIID); }
  void m_fn1 (B, int);
};
class D;
class F
{
public:
  F (int);
};
class G
{
public:
  D *operator[](int);
};
class H
{
  virtual nsresult m_fn2 ();

public:
  void m_fn3 ();
};
class J : H
{
  G mQueries;
  int mLiveUpdate;
  nsresult m_fn2 ();
};
class D
{
public:
  nsresult m_fn4 (int);
  void m_fn5 (int);
};
class I
{
public:
  static I *
  m_fn6 ()
  {
    B __trans_tmp_3;
    if (!gHistoryService)
      C serv = __trans_tmp_3;
  }
  void m_fn7 ();
  static I *gHistoryService;
};
D *Refresh___trans_tmp_2;
D Refresh___trans_tmp_6, Refresh___trans_tmp_5;
int Refresh_hasDomain;
nsresult
J::m_fn2 ()
{
  m_fn3 ();
  I history = *I::m_fn6 ();
  switch (mLiveUpdate)
    {
    case 1:
      {
        mQueries[0];
        F query = 0;
        if (Refresh_hasDomain)
          return NS_OK;
      }
    case 0:
      {
        Refresh___trans_tmp_2 = mQueries[0];
        F query = Refresh___trans_tmp_5.m_fn4 (0);
        history.m_fn7 ();
        Refresh___trans_tmp_6.m_fn5 (0);
      }
    case 3:
      m_fn2 ();
    }
}