2015-05-18 Steven G. Kargl <kargl@gcc.gnu.org>
[official-gcc.git] / gcc / testsuite / g++.dg / ipa / pr59737.C
blobcb8a8aa2cdceedae1dd7e4d35700657e0b82720d
1 // PR middle-end/59737
2 // { dg-do compile }
3 // { dg-options "-O2" }
5 struct A
7   virtual void foo (int &x);
8   friend void
9   operator>> (int &x, A &y)
10   {
11     y.foo (x);
12   }
15 struct B : public A
17   void foo (int &x);
20 struct F : public B
22   void foo (int &x);
25 struct G : public F
27   void foo (int &);
30 struct C : A
32   void foo (int &);
33   struct H : public G
34   {
35     void foo (int &);
36   };
37   struct D : A
38   {
39     H d;
40   };
43 void
44 C::foo (int &x)
46   D a;
47   x >> a.d;