Fix test-suite fallout of default -Wreturn-type.
[official-gcc.git] / gcc / testsuite / g++.dg / torture / pr64565.C
blobea5ca14e23a8ddffafdce697c5349efe9033e304
1 /* { dg-do compile } */
2 /* { dg-additional-options "-Wno-return-type" } */
4 typedef enum
6   NS_OK
7 } nsresult;
8 struct A
10   static int kIID;
12 class B
15 class C
17 public:
18   C (B p1) { m_fn1 (p1, A::kIID); }
19   void m_fn1 (B, int);
21 class D;
22 class F
24 public:
25   F (int);
27 class G
29 public:
30   D *operator[](int);
32 class H
34   virtual nsresult m_fn2 ();
36 public:
37   void m_fn3 ();
39 class J : H
41   G mQueries;
42   int mLiveUpdate;
43   nsresult m_fn2 ();
45 class D
47 public:
48   nsresult m_fn4 (int);
49   void m_fn5 (int);
51 class I
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;
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 ()
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     }