ICF is more strict about non-common function and var
[official-gcc.git] / gcc / testsuite / g++.dg / ipa / pr61800.C
blob3bc796f9903430a460e34a08b6c436f0781754d5
1 /* PR ipa/61800 */
2 /* { dg-do compile } */
3 /* { dg-require-visibility "" } */
4 /* { dg-options "-O2" } */
6 #pragma GCC visibility push(hidden)
7 class A
9 public:
10   unsigned long m_fn1 () const;
12 class B;
13 class C
15 public:
16   ;
17   virtual bool m_fn2 (void) = 0;
19 class D
21   virtual bool m_fn3 (const int &p1, B *p2) = 0;
23 class F : public D
25   bool m_fn3 (const int &p1, B *p2);
26   A mPredicates;
28 class B
31 class G : public B
33   virtual unsigned int m_fn4 () = 0;
35 class H : public G
37 public:
38   int txNodeSetContext_aContextNodeSet;
39   H (B *p1) {}
40   int
41   m_fn5 ()
42   {
43     return mPosition < m_fn4 ();
44   }
45   unsigned int m_fn4 ();
46   unsigned int mPosition;
49 unsigned int a;
50 C *b;
51 bool
52 F::m_fn3 (const int &p1, B *p2)
54   if (!b->m_fn2 ())
55     return false;
56   unsigned int c = mPredicates.m_fn1 ();
57   for (1; 1 < c; ++a)
58     {
59       H d (p2);
60       while (d.m_fn5 ())
61         {
62           do
63             {
64             }
65           while (0);
66         }
67     }