OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [g++.old-deja/] [g++.jason/] [overload13.C] - Blame information for rev 305

Details | Compare with Previous | View Log

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

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.