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.
4
5struct xios {
6  virtual ~xios() { }
7};
8
9struct xistream: virtual public xios {
10  int j;
11  void operator>>(char&);
12};
13
14struct xfstreambase: virtual public xios { };
15
16struct xifstream: public xfstreambase, public xistream { };
17
18void operator>>(xistream& i, int j)
19{
20  i.j = 0;
21}
22
23int main() {
24  int i;
25  xifstream ifs;
26
27  ifs >> i;
28}
29