2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.jason / overload13.C
blob74205c1b086bb0b6314d2a231ba98b0851bb393c
1 // { dg-do run  }
2 // Bug: g++ screws up derived->base conversions when calling a global function
3 // in the presence of matching members in the base.  Whew.
5 struct xios {
6   virtual ~xios() { }
7 };
9 struct xistream: virtual public xios {
10   int j;
11   void operator>>(char&);
14 struct xfstreambase: virtual public xios { };
16 struct xifstream: public xfstreambase, public xistream { };
18 void operator>>(xistream& i, int j)
20   i.j = 0;
23 int main() {
24   int i;
25   xifstream ifs;
26   
27   ifs >> i;