Debian Codegraph @

gcc/testsuite/g++.dg/ipa/pr63470.C

raw
1 /* PR ipa/63470.C */
2 /* { dg-do compile } */
3 /* { dg-options "-O2 -finline-functions -Wno-return-type" } */
4
5 class A
6 {
7 public:
8 virtual bool m_fn1 ();
9 virtual const char **m_fn2 (int);
10 virtual int m_fn3 ();
11 };
12 class FTjackSupport : A
13 {
14 ~FTjackSupport ();
15 bool m_fn1 ();
16 bool m_fn4 ();
17 const char **
18 m_fn2 (int)
19 {
20 return 0;
21 }
22 int _inited;
23 int *_jackClient;
24 int _activePathCount;
25 }
26
27 * a;
28 void fn1 (...);
29 void fn2 (void *);
30 int fn3 (int *);
31 FTjackSupport::~FTjackSupport () { m_fn4 (); }
32
33 bool
34 FTjackSupport::m_fn1 ()
35 {
36 if (!_jackClient)
37 return 0;
38 for (int i=0; _activePathCount; ++i)
39 if (m_fn2 (i))
40 fn2 (a);
41 if (m_fn3 ())
42 fn2 (a);
43 if (fn3 (_jackClient))
44 fn1 (0);
45 }
46
47 bool
48 FTjackSupport::m_fn4 ()
49 {
50 if (_inited && _jackClient)
51 {
52 m_fn1 ();
53 return 0;
54 }
55 }