Remove old autovect-branch by moving to "dead" directory.
[official-gcc.git] / old-autovect-branch / gcc / testsuite / g++.old-deja / g++.jason / overload11.C
blob3fe871918852e246aed26c9bf6e8b7f7d570cd4f
1 // { dg-do run  }
2 // PRMS Id: 4697
3 // Bug: g++ calls the non-const method for a const object.
5 class A {
6 public:
7   void foo(int &i) const { i = 0; }
8   void foo(int &i) { i = 1; }
9 };
11 int main()
13   A a;
14   const A& b = a;
15   int i = 2;
16   b.foo (i);
17   return i;