1// Bug: g++ screws up derived->base conversions when calling a global function
2// in the presence of matching members in the base.  Whew.
3
4struct xios {
5  virtual ~xios() { }
6};
7
8struct xistream: virtual public xios {
9  int j;
10  void operator>>(char&);
11};
12
13struct xfstreambase: virtual public xios { };
14
15struct xifstream: public xfstreambase, public xistream { };
16
17void operator>>(xistream& i, int j)
18{
19  i.j = 0;
20}
21
22int main() {
23  int i;
24  xifstream ifs;
25
26  ifs >> i;
27}
28