Debian Codegraph @

gcc/testsuite/g++.dg/torture/pr64565.C

raw
1 /* { dg-do compile } */
2 /* { dg-additional-options "-Wno-return-type" } */
3
4 typedef enum
5 {
6 NS_OK
7 } nsresult;
8 struct A
9 {
10 static int kIID;
11 };
12 class B
13 {
14 };
15 class C
16 {
17 public:
18 C (B p1) { m_fn1 (p1, A::kIID); }
19 void m_fn1 (B, int);
20 };
21 class D;
22 class F
23 {
24 public:
25 F (int);
26 };
27 class G
28 {
29 public:
30 D *operator[](int);
31 };
32 class H
33 {
34 virtual nsresult m_fn2 ();
35
36 public:
37 void m_fn3 ();
38 };
39 class J : H
40 {
41 G mQueries;
42 int mLiveUpdate;
43 nsresult m_fn2 ();
44 };
45 class D
46 {
47 public:
48 nsresult m_fn4 (int);
49 void m_fn5 (int);
50 };
51 class I
52 {
53 public:
54 static I *
55 m_fn6 ()
56 {
57 B __trans_tmp_3;
58 if (!gHistoryService)
59 C serv = __trans_tmp_3;
60 }
61 void m_fn7 ();
62 static I *gHistoryService;
63 };
64 D *Refresh___trans_tmp_2;
65 D Refresh___trans_tmp_6, Refresh___trans_tmp_5;
66 int Refresh_hasDomain;
67 nsresult
68 J::m_fn2 ()
69 {
70 m_fn3 ();
71 I history = *I::m_fn6 ();
72 switch (mLiveUpdate)
73 {
74 case 1:
75 {
76 mQueries[0];
77 F query = 0;
78 if (Refresh_hasDomain)
79 return NS_OK;
80 }
81 case 0:
82 {
83 Refresh___trans_tmp_2 = mQueries[0];
84 F query = Refresh___trans_tmp_5.m_fn4 (0);
85 history.m_fn7 ();
86 Refresh___trans_tmp_6.m_fn5 (0);
87 }
88 case 3:
89 m_fn2 ();
90 }
91 }