FSF GCC merge 02/23/03
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.jason / overload13.C
blob6b5ca0fa93d27f08102dd8acf529ccd4397fff5a
1 // Bug: g++ screws up derived->base conversions when calling a global function
2 // in the presence of matching members in the base.  Whew.
4 struct xios {
5   virtual ~xios() { }
6 };
8 struct xistream: virtual public xios {
9   int j;
10   void operator>>(char&);
13 struct xfstreambase: virtual public xios { };
15 struct xifstream: public xfstreambase, public xistream { };
17 void operator>>(xistream& i, int j)
19   i.j = 0;
22 int main() {
23   int i;
24   xifstream ifs;
25   
26   ifs >> i;