URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
Subversion Repositories openrisc_2011-10-31
[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.2.2/] [gcc/] [testsuite/] [g++.old-deja/] [g++.jason/] [overload11.C] - Rev 149
Go to most recent revision | Compare with Previous | Blame | View Log
// { dg-do run }
// PRMS Id: 4697
// Bug: g++ calls the non-const method for a const object.
class A {
public:
void foo(int &i) const { i = 0; }
void foo(int &i) { i = 1; }
};
int main()
{
A a;
const A& b = a;
int i = 2;
b.foo (i);
return i;
}
Go to most recent revision | Compare with Previous | Blame | View Log